How do period, grace time and cron schedules work for heartbeat monitors?
A heartbeat is late when no success ping arrives by its deadline: the last ping plus the period plus the grace time, or, with a cron expression, the next scheduled time after the last ping (in the timezone you set) plus the grace time. Grace defaults to 10 minutes. Vigil checks deadlines every minute and alerts as soon as one passes.
1. Pick fixed period or cron expression
Fixed period suits jobs that run every N minutes: "expected every 60 minutes" means a ping must arrive within that many minutes of the previous one. Cron expression suits jobs on a schedule: enter the same line as your crontab, for example 0 2 * * *, and the timezone the server uses, for example Asia/Kolkata. The timezone must be an IANA name; it defaults to UTC, so a job at 02:00 IST with UTC selected looks 5½ hours off.
2. Set the grace time to the job's normal spread
Grace is how late a ping may be before you're alerted. Set it a little above how long the job normally takes plus any start-up delay. A backup that takes 20 minutes and pings when it finishes needs at least 20 minutes of grace. Before the first ping, the clock starts from when you created the monitor.
3. Ping when the job succeeds
Call https://puzaricloud.in/ping/<token> at the end of the job, for example 0 2 * * * /usr/local/bin/backup.sh && curl -fsS https://puzaricloud.in/ping/<token>. The && means a failing job never pings, so it shows up as late.
4. Report failures and run time (optional)
/ping/<token>/fail marks the job failed and alerts at once instead of waiting for the deadline. /ping/<token>/<exit-code> does the same from an exit code (0 is success, 1–255 failure). /ping/<token>/start at the beginning records the run time; with Max run time set, a run that hasn't finished in time alerts too. A POST body (job output) is kept with the ping as its log.
5. Still showing late?
Run the curl command by hand on the server that runs the job and check it returns OK. If it can't reach puzaricloud.in, a firewall or proxy is blocking outbound HTTPS. Check the schedule and timezone in the monitor's summary line.
Still stuck?
Write to us on the contact page or at hello@puzaricloud.in with the monitor or page name and what you expected. A person answers; we reply within one business day.
Create a heartbeat monitor → No account yet? Start free.