Cron

Syntax

minute / hour / dom / month / dow

* - any value
, - set of values
- - value range
  • minute

    • 1–59
  • hour

    • 0–23
  • dom

    • 1–31
  • month

    • 1–12
    • JAN–DEC
  • dow

    • 0–6
    • SUN–SAT
0 0 * * * command
0 0 1 * * another command

System cron jobs

Applies to systems fitted with systemd

(crontab -l 2>/dev/null; echo "0 1 * * * ntpdate 0.nl.pool.ntp.org >/dev/null 2>&1") | crontab -
(crontab -l 2>/dev/null; echo "0 2 * * * journalctl --vacuum-size=200M >/dev/null 2>&1") | crontab -