What are Scheduled Tasks?
Scheduled Tasks (also known as cron job monitoring or heartbeat monitoring) let you monitor background jobs, cron jobs, and any recurring processes. UptimeEye uses a dead man's switch approach: your task's job sends a beat to UptimeEye at regular intervals. If a beat is missed, UptimeEye alerts you.
Task Types
UptimeEye supports two types of scheduled tasks:
- Simple Task - Define a fixed interval (e.g., every 5 minutes, every 2 hours, every 1 day). Best for tasks that run at regular intervals.
- Cron Task - Use a cron expression (e.g.,
0 9 * * 1-5) with timezone support. Best for tasks with complex schedules.
Creating a Scheduled Task
To create a new scheduled task:
- Open Scheduled Tasks in the sidebar
- Click "New scheduled task"
- Enter a name for your task
- Select a notification channel to receive alerts
- Choose the task type (Simple or Cron)
- Configure the schedule (interval or cron expression with timezone)
- Optionally set a grace period (minutes to wait before marking as down)
- Click "Create task" to save your configuration
Beat API (Integration Endpoints)
After creating a scheduled task, you'll find its beat token on the task's page. Keep it secret: anyone with it can send beats for the task, while the task ID is shown on status pages and in incidents. Use the token to send beats from your application using simple HTTP requests. All endpoints accept GET, POST, and HEAD methods.
| Endpoint | Description |
|---|---|
| /v1/beat/{beatToken} | Report a successful execution (default beat) |
| /v1/beat/{beatToken}/success | Explicitly report success |
| /v1/beat/{beatToken}/fail | Report a failure (triggers alert immediately) |
| /v1/beat/{beatToken}/start | Signal that the task has started running |
Example usage with cURL:
# Send a beat after your cron job completes
curl -X GET https://api.uptimeeye.com/v1/beat/YOUR_BEAT_TOKEN
# Report failure if something goes wrong
curl -X POST https://api.uptimeeye.com/v1/beat/YOUR_BEAT_TOKEN/failGrace Period
The grace period defines how many minutes UptimeEye waits after a missed beat before marking the task as down and sending an alert. This is useful for tasks that may occasionally take longer than expected. Set it to 0 for immediate alerting.
A task with an expected interval of at most 30 minutes that goes down for the third time within 60 minutes (at least 12 intervals) is marked Unstable: that outage stays open, with one notification instead of a down and a recovery notification per outage, until no beat was missed or failed for 30 minutes (at least 6 intervals); then one "stable again" notification goes out. Scheduled tasks have no switch for it. Outside of that, one successful beat is enough for a task to be up again.