When you create a monitor for a cron job with a schedule like 4 5 * * *
you will be alerted if anything goes wrong with your job, including:
Creating a test monitor or monitoring a single cron job can usually be completed in just a few minutes.
/run
ping followed by a /fail
ping to simulate a job that started and then exited with an error.
For production usage, read the integration guide to learn more about using CronitorCLI or Curl to send pings when your job runs.
Your new monitor is created in a paused state; monitoring will not begin until the first ping is received.
If you are monitoring cron jobs on Linux, BSD or MacOS, using cronitor discover
in CronitorCLI is
the easiest way to automatically create monitors for each job and keep their schedule in sync with your server.
cronitor discover
to find cron jobs and import them into Cronitor.
--save
option is supplied, saving will happen automatically without a prompt first.
If your job schedules change frequently it can be challenging to ensure that your Cronitor monitors are in sync. Over time, this can accumulate false alarms and noisy alerts. By scheduling cronitor discover
to run every hour, schedule updates will be pushed automatically to Cronitor on a regular basis. When using cronitor discover
to import your crontab, this entry is added automatically.
Cronitor uses past performance to notify you when your job runs significantly longer than expected. Our prediction algorithm grows more precise as we learn more about your job performance but it won't work perfectly for every job. If you are receiving has not completed when expected alerts earlier than you would like, you can increase the "grace period" for your monitor or provide a specific expected duration for the job:
To send duration alerts, Cronitor must know when your job starts running and when it completes successfully. To
report these events, you should run your job using cronitor exec
or ping your /run
endpoint as your job starts and /complete
as it exits successfully. For more details on Ping API endpoints and where you should integrate your ping requests,
see:
If you don't expect your job to start immediately at the scheduled time, expand the grace time on your monitor. Ensure your grace period exceeds any intentional or expected delay.
In some systems, cron schedules can have 6 values, meaning either seconds or year. In both cases, Cronitor attempts to ignore this additional value. We hope to expand support and handling for these more precise schedules.
For Cronitor to alert you when something goes wrong with your job a small amount of integration work is required to tell Cronitor when your job runs. The absolute easiest way to do this is
to run your job using cronitor exec
, but you can tell Cronitor nearly everything it needs with just a couple curl
requests. See the
Cronitor Integration Guide for more details.
On Linux and MacOS, use timedatectl
or date
to determine the current timezone locale. On Windows, use tzutil /g
.
Timezones can be set per monitor, and an account-wide default is available on the account settings page.