SMS, Telegram or Bale? Choosing Alert Channels Without Alert Fatigue
Which downtime alerts should go by SMS and which to Telegram or Bale, how to route by urgency, and how to keep the important alerts from drowning in noise.
A cron expression is five short fields that describe "when". They are compact, powerful and easy to get subtly wrong - a job that should run once a day can run every minute of 3 a.m. with a single misplaced asterisk. This guide explains each field and gives you schedules you can copy.
*, ,, - and / combine into almost any schedule.* 3 * * * runs 60 times between 03:00 and 03:59; you probably meant 0 3 * * *.noc724 checks your websites, servers and APIs around the clock and alerts you by SMS, Telegram or Bale the moment something breaks.
┌───────── minute (0-59)
│ ┌─────── hour (0-23)
│ │ ┌───── day of month (1-31)
│ │ │ ┌─── month (1-12 or JAN-DEC)
│ │ │ │ ┌─ day of week (0-7 or SUN-SAT; 0 and 7 are Sunday)
│ │ │ │ │
* * * * * commandA job runs when the current time matches all fields - with one exception for the two day fields, explained below.
| Character | Meaning | Example | Runs |
|---|---|---|---|
* | any value | * * * * * | every minute |
, | list | 0 8,12,18 * * * | at 08:00, 12:00 and 18:00 |
- | range | 0 9-17 * * * | every hour from 09:00 to 17:00 |
/ | step | */10 * * * * | every 10 minutes |
a-b/n | step within range | 0 8-20/4 * * * | 08:00, 12:00, 16:00, 20:00 |
Steps count from the start of the range: */7 in the minute field means 0, 7, 14 ... 56, then 0 again - not "every 7 minutes" across the hour boundary.
| Expression | Schedule |
|---|---|
*/5 * * * * | every 5 minutes |
0 * * * * | every hour, on the hour |
30 2 * * * | every day at 02:30 |
0 9 * * 1-5 | weekdays at 09:00 |
0 0 * * 0 | every Sunday at midnight |
0 6 1 * * | the 1st of each month at 06:00 |
0 0 1 1 * | once a year, 1 January at midnight |
15 14 * * 6 | Saturdays at 14:15 |
In Iran, where the working week usually runs Saturday to Wednesday, "working days at 09:00" is 0 9 * * 6,0-3.
You can build and check expressions with the cron expression generator.
Many cron implementations accept named shortcuts:
| Shortcut | Equivalent |
|---|---|
@hourly | 0 * * * * |
@daily / @midnight | 0 0 * * * |
@weekly | 0 0 * * 0 |
@monthly | 0 0 1 * * |
@yearly / @annually | 0 0 1 1 * |
@reboot | once when cron starts |
* 3 * * * means every minute during the 3 o'clock hour. For "once at 03:00", write 0 3 * * *.
If day of month and day of week are both set, the job runs when either matches. 0 9 13 * 5 runs on every 13th *and* every Friday - not only on Friday the 13th. Restrict one day field and check the other inside the script if you need both.
0 0 31 2 * never runs: February has no 31st. "The last day of the month" isn't expressible in standard cron; run on days 28-31 and let the script check whether tomorrow is the 1st:
0 23 28-31 * * [ "$(date -d tomorrow +\%d)" = "01" ] && /opt/app/month-end.shCron follows the server's local time. On servers that observe daylight saving, a job scheduled in the skipped hour may not run and one in the repeated hour may run twice. Running servers in UTC avoids both problems; some cron versions also support a CRON_TZ variable.
Quartz (Java), Spring and some cloud schedulers use six or seven fields with seconds first and sometimes ? for "no specific value". An expression copied between systems can silently mean something else.
Standard cron's smallest unit is one minute. Use two entries, one with sleep 30 before the command, or use a systemd timer, which supports seconds.
No. If the server was off at the scheduled time, the run is skipped. anacron and systemd timers with Persistent=true can run missed jobs after boot.
Sunday. Both 0 and 7 mean Sunday, and 1 is Monday.
Written by
The noc724 team
Uptime monitoring engineers
We build and run noc724, an uptime monitoring service that checks websites, servers and APIs from several cities in Iran. These guides come from the problems we and our users run into while keeping services online.
Contact the teamExpert on:Cron Monitoring
Which downtime alerts should go by SMS and which to Telegram or Bale, how to route by urgency, and how to keep the important alerts from drowning in noise.
Why uptime monitors raise false alarms - network blips, timeouts, rate limits, content changes - and the settings that remove them while keeping real alerts fast.
How to set up a simple on-call rotation and escalation policy so every critical alert is answered, without burning out a small team.