Your website returns HTTP 200. Meanwhile, the nightly import has not started and yesterday's backup has failed. Website availability alone will not reveal those problems. Cron job monitoring adds a different view: did a task start when expected, did it finish, and what result did it report?
This guide shows how to monitor cron jobs with MetriBeacon, connect an existing command and test the complete reporting and alerting flow. Start with one important task and a schedule you already understand.
What is cron job monitoring?
Cron job monitoring records the executions of scheduled tasks and compares them with a configured expectation. Instead of checking whether a website responds, it observes the task's start, completion and duration.
Typical uses include data imports, exports, cleanup scripts and backups. For each task, define what a successful result means. Exit code zero tells you that the process reported success. It does not prove that an imported file contains the right data or that a backup can be restored.
MetriBeacon records individual runs and can identify missing scheduled starts when a cron schedule is configured. Cron, a systemd timer or your workflow platform continues to execute the task. MetriBeacon provides the monitoring around it.
Distinguish these four run outcomes
| Outcome | What the monitor observes | What to check first |
|---|---|---|
| Successful | A completion event reports success | The task's business result, if needed |
| Failed or aborted | The process reports an error or termination | Exit code, local logs and dependencies |
| Missed | No expected start arrived before the tolerance expired | Scheduler, timezone, host and event delivery |
| Overdue | A started run exceeds its configured runtime limit | Progress, blocked dependencies and resources |
A missed report needs investigation. The task might not have run, or it might have run while its monitoring event could not be delivered. Compare the run history with local logs and the host's state before deciding what happened.
If you already monitor the public website, combine both views. The website monitoring guide explains availability, response times and certificate checks. A green homepage and a failed background task can both be accurate observations.
Set up a cron job monitor in MetriBeacon
1. Choose the task and its expected result
Pick a task whose failure you can act on, such as a nightly product import. Write down its command, actual schedule, timezone and typical duration. Keep credentials and full logs on your own system; the monitor does not need them to identify a run.
2. Open the Backup/Cron job template
Sign in or create a free account. Open the Backup/Cron job template, choose a workspace and name the monitor after the task. For example, “Nightly product import” is more useful in an alert than “Cron 1”.
Enter the five-field cron expression and the IANA timezone used by your scheduler. 0 3 * * * describes a daily run at 03:00 in that timezone. It is an example, not a reason to change your existing production schedule. Review the preview and explicitly create the monitor.
3. Set a useful tolerance and runtime limit
The template's scheduled-run tolerance is 300 seconds. This gives a start report five minutes after its scheduled time to arrive before the expectation becomes missed. Review that value against your task's scheduling and delivery behaviour.
The maximum runtime answers a separate question: how long may an already started task take? If a task normally finishes in two minutes, a ten-minute limit may be a useful starting point. Those timings are examples; use your own history to choose a threshold.
With a 03:00 schedule and five-minute tolerance, a missing start can become visible after 03:05. A run starting at 03:00 with a ten-minute runtime limit can become overdue after 03:10. Worker processing and notification delivery also take time, so these are thresholds rather than promises of an exact alert arrival.
4. Create a monitor key
Create a device key for this monitor in key management. Save it in a private file on the computer that runs the task, readable only by its service user; on Linux, use file permissions 0600. Do not paste the key into the crontab or a command argument.
The key management guide explains scope and rotation. Install the official CLI using the MetriBeacon documentation. Use the installed binary's actual path in the commands below.
Report executions with the CLI wrapper
The metribeacon run wrapper starts your existing command and reports its start and completion under the same run ID. It preserves the command's output and exit code.
The following is a Linux example. Replace the sample UUID, paths and key file with your own values. First test on a dedicated test monitor with a harmless command:
/home/job/.local/bin/metribeacon run \
--monitor-id 11111111-1111-4111-8111-111111111111 \
--key-file /home/job/.config/metribeacon/import.key \
-- /usr/bin/true
Then replace /usr/bin/true with your actual task. A user crontab entry could look like this:
0 3 * * * /home/job/.local/bin/metribeacon run --monitor-id 11111111-1111-4111-8111-111111111111 --key-file /home/job/.config/metribeacon/import.key -- /home/job/bin/nightly-import
Use absolute paths and check the scheduler's environment. The wrapper executes the command after -- without adding a shell. For pipelines or a sequence of commands, place the logic in a script and run that script.
By default, a monitoring delivery error does not change an otherwise successful business process into a failed one. Read the wrapper's diagnostics if a run is absent from the dashboard. A successful local command and a successfully delivered monitoring event are separate results.
The cron job documentation covers the full configuration. If tolerance windows overlap, --scheduled-for supplies the exact scheduled UTC minute and avoids ambiguous assignment. Use a timestamp produced by your scheduler or integration, rather than a fixed date copied from an example.
Align schedules, timezones and daylight saving time
The schedule in MetriBeacon must describe the schedule that actually runs your command. An expression evaluated in UTC can refer to a different local time from the same expression evaluated in Europe/Berlin.
Daylight saving changes deserve particular attention. Some local times do not occur; others occur twice. Check your scheduler's behaviour and MetriBeacon's schedule settings together. The crontab manual explains cron fields and time matching. Different scheduler implementations may handle clock changes differently.
If you change the real job's schedule, update its monitoring definition as well. When intentionally pausing a task, pause the corresponding schedule monitoring so the absence is expected.
Test reporting and alerts before relying on them
Enable the run alert explicitly. It covers failed, aborted, overdue and missed runs; receiving run events alone does not create an alert rule. Connect email or Telegram and check delivery with a test message.
On a dedicated test monitor, verify the important cases:
/usr/bin/truereports a successful completion./usr/bin/falsereports a failed completion with a nonzero exit code.- A deliberately omitted scheduled test run becomes missed after the tolerance.
- A harmless test command exceeding a short runtime limit becomes overdue.
- The intended recipient receives the notification.
Keep these tests separate from production tasks. There is no need to break a real import or backup to verify monitoring. After an alert, inspect the relevant run, its timestamps and local logs; then check the task's actual output before treating the incident as resolved.
Cron job monitoring FAQ
Is cron job monitoring with MetriBeacon free?
Yes, within the service's technical quotas. Runs use the existing event, byte and request budgets. The free monitoring overview explains the current limits; your account shows your usage.
Does MetriBeacon run my cron jobs?
Your own scheduler runs the task. MetriBeacon observes reported executions and configured expectations. Adding a monitoring schedule does not install a cron entry on your server.
Can I monitor a task without a cron schedule?
Yes. A task can report starts and completions without a cron definition. A missing scheduled-run expectation requires a configured schedule, because the monitor needs to know when a run is due.
Does a successful backup job prove the backup is usable?
A successful process is one signal. Test restoration separately and check any application-specific requirements. MetriBeacon does not create or validate your backup merely because it monitors the job.
What if monitoring events cannot be sent?
Inspect the wrapper's diagnostics, connectivity, system time and account usage. A missing event does not prove that the underlying task failed. The CLI can retry delivery and use a bounded local buffer, but a buffer is not an unlimited delivery guarantee.
Your first monitored task: a short checklist
Choose an important task, match the schedule and timezone, set tolerance and runtime limits, and protect its monitor key. Confirm both success and failure reports, enable the run alert and test its delivery.
Start with the Backup/Cron job template using the button below. Once the first task is reporting reliably, add other imports, exports or scheduled maintenance tasks whose results you can use.

