Cron job every quarter

To run a cron job every quarter, use 0 0 1 1,4,7,10 *. At 00:00 on the 1st of the month in January, April, July and October.

  • Free
  • No Sign-Up
  • Runs in Your Browser

Runs

Next Runs

Your time zone
Friday1 Jan 2027, 00:00
Thursday1 Apr 2027, 00:00
Thursday1 Jul 2027, 00:00
Friday1 Oct 2027, 00:00
Saturday1 Jan 2028, 00:00

Crontab Line

0 0 1 1,4,7,10 * /path/to/job.sh >> /var/log/cron-job.log 2>&1

Cron Expression Generator

0 0 1 1,4,7,10 * explained

Expression0 0 1 1,4,7,10 *
MeaningAt 00:00 on the 1st of the month in January, April, July and October
Runs per Week0
Crontab Line0 0 1 1,4,7,10 * /path/to/job.sh
systemd OnCalendarquarterly
Time ZoneThe server's, unless CRON_TZ is set

Cron checks the schedule once a minute and starts the job at the start of each matching minute, in the server's time zone.

If a run can take longer than the gap between runs, stop runs overlapping with flock: 0 0 1 1,4,7,10 * flock -n /tmp/job.lock /path/to/job.sh. A second copy then exits straight away instead of piling up.

Cron runs jobs with a minimal environment: use full paths, and send output to a log file (>> /var/log/job.log 2>&1) so errors are not lost.

Questions

How do I run a cron job every quarter?
Run crontab -e and add: 0 0 1 1,4,7,10 * /path/to/job.sh
How do I check the cron job ran?
Look in the job's own log if it writes one, or the system log: grep CRON /var/log/syslog on Debian and Ubuntu, or journalctl -u cron (cron.service is crond on RHEL).
What is the systemd timer equivalent of 0 0 1 1,4,7,10 *?
OnCalendar=quarterly in a .timer unit. systemd timers can also catch up on missed runs with Persistent=true.

Run servers for other people?

Frabs stops the abuse their VMs send out, and keeps your network off blocklists.