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 receive a unique task ID. Use this ID to send beats from your application using simple HTTP requests. All endpoints accept GET, POST, and HEAD methods.
| Endpoint | Description |
|---|---|
| /v1/beat/{taskId} | Report a successful execution (default beat) |
| /v1/beat/{taskId}/success | Explicitly report success |
| /v1/beat/{taskId}/fail | Report a failure (triggers alert immediately) |
| /v1/beat/{taskId}/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_TASK_ID
# Report failure if something goes wrong
curl -X POST https://api.uptimeeye.com/v1/beat/YOUR_TASK_ID/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.