1. Get Started
  2. Monitor a cron job or scheduled task

Get Started

Monitor a cron job or scheduled task

When logged into OnlineOrNot, navigate your way to the heartbeats dashboard to see your list of monitors.

Creating your check

If it's your first time using OnlineOrNot, this list will be empty, so let's create our first one.

First, click on the Add heartbeat button, and enter a name, reporting period, and grace period for your cron job or scheduled task.

OnlineOrNot Create Cron Job Monitor

Reporting period

The field under the label "Expect a heartbeat every" is called the reporting period. Enter how often you expect your cron job or scheduled task to run.

For example, if I have a database backup that runs every day, I would enter 24 hours.

Grace period

The Grace period field configures how late the cron job is allowed to be, before OnlineOrNot sends an alert.

For example, if I know that my database backup can run up to 30 minutes late without a problem, I would enter 30 minutes.

Done!

At the bottom of the form, hit Save, and you will be redirected to your newly created check.

You will see the URL for the check you just added, and it will be ready to receive requests.

OnlineOrNot Create Cron Job Monitor URL

For example, if my cron job is a shell script called backup_db_to_r2, I can add a curl to the job to start sending heartbeats to OnlineOrNot:

# my crontab
30 18 * * * backup_db_to_r2 && curl https://oonchk.com/xxxxxxxxx

© 2024 OnlineOrNot SASU, 66 Av. des Champs-Élysées 75008 Paris
Made with in Sydney, Australia 🇦🇺 and Toulouse, France 🇫🇷