Cron tools › Convert
OnCalendar tester
Type a calendar expression from a systemd timer and see what systemd makes of it: the normalized form, when it
next elapses, and the elapses after that — the same questions systemd-analyze calendar --iterations=N answers,
without a Linux box at hand.
Elapses
Try one
How to test an OnCalendar expression
- Type the value of an
OnCalendar=line (pasting the wholeOnCalendar=…line works too). - Read the normalized form — the full
weekday YYYY-MM-DD HH:MM:SSversion with every default filled in. - Pick the zone to evaluate in. An expression that ends with a zone (
daily UTC) uses that zone instead. - Raise Iterations to see more elapses, then compare with
systemd-analyze calendaron the machine.
The syntax in one table
| Part | Form | Example | Means |
|---|---|---|---|
| Weekday | names, , lists, .. ranges | Mon..Fri | Monday to Friday; optional |
| Date | Y-M-D | *-*-01 | the 1st of every month; omitted = *-*-* |
| From the end | M~D | *-02~03 | the third-last day of February |
| Time | H:M[:S] | 9:30 | 09:30:00; omitted = 00:00:00 |
| Repetition | start/step | *:00/15 | every 15 minutes from :00 |
| Range | a..b | 09..17:00 | on the hour, 09:00 to 17:00 |
| Zone | UTC or IANA name, last | daily Europe/Berlin | evaluated in that zone |
Weekday and date must both match: Fri *-*-13 is Friday the 13th only. That is the opposite of cron, which
runs when either day field matches — see cron to systemd timer for the conversion.
Shorthands
| Shorthand | Normalized form |
|---|---|
| minutely | *-*-* *:*:00 |
| hourly | *-*-* *:00:00 |
| daily | *-*-* 00:00:00 |
| weekly | Mon *-*-* 00:00:00 |
| monthly | *-*-01 00:00:00 |
| quarterly | *-01,04,07,10-01 00:00:00 |
| semiannually | *-01,07-01 00:00:00 |
| yearly | *-01-01 00:00:00 |
FAQ
What does the ~ in a date mean?
It counts days from the end of the month instead of the start. *-*~01 is the last day of every month,
*-02~03 the third-last day of February (the 26th, or the 27th in a leap year), and Mon *-05~07/1
the last Monday in May: the last seven days of May, Mondays only.
What if I leave out the time or the date?
A missing time means 00:00:00 and a missing date means every day, so Mon alone is every Monday at midnight
and 9:30 alone is every day at 09:30:00. Leaving out the seconds gives :00.
Is the output identical to systemd-analyze?
The layout follows it (Original form, Normalized form, Next elapse, From now, then one line per iteration). For the
documented forms the normalized text is what systemd prints; when values arrive out of order or weekday ranges overlap,
the page says so, and the machine's own systemd-analyze calendar is the final word. Zone abbreviations come
from your browser.
Which time zone does a timer use?
The one written at the end of the expression, if any; otherwise the machine's local time. This page evaluates in the zone you pick, which defaults to your browser's.
Why is a time in the list missing around a clock change?
On the day the clocks jump forward some wall-clock times do not exist. They are left out of the list and counted in a warning, because how systemd treats them is not covered by our reference.