haim evgi Asked: 2010-04-06 22:09:18 +0800 CST2010-04-06 22:09:18 +0800 CST 2010-04-06 22:09:18 +0800 CST how to run cron job every 3 months? 772 What would be the crontab entry look like for a job that runs on the first day of every third month? linux unix cron 4 Answers Voted Best Answer Richard Holloway 2010-04-06T22:20:48+08:002010-04-06T22:20:48+08:00 The following will run script on the 1st of Jan, Apr, Jul and Oct at 03:30 30 03 01 Jan,Apr,Jul,Oct * /path/to/script Alternatively, but less obvious 30 03 01 */3 * /path/to/script Will run every three months at 03:30 on the 1st of Jan,Apr,Jul and Oct. Jon Rhoades 2010-04-06T22:21:26+08:002010-04-06T22:21:26+08:00 Wikipedia has a nice explanation about how to configure Cron. For your specific case you could run a Cron Expression to run every 3 months- obviously change the months to suit your schedule. 0 0 1 JAN,APR,JUL,OCT * /path/to/script.bash Josiel Faleiros 2020-07-21T07:14:31+08:002020-07-21T07:14:31+08:00 The accepted answer is good, thou I'd use an alternative with simpler numbers and easier to read: https://crontab.guru 0 0 1 */3 * Read like this: “At 00:00 on day-of-month 1 in every 3rd month.” lobi 2020-02-05T14:36:56+08:002020-02-05T14:36:56+08:00 For JIRA (and other 6 digit cron expressions): 0 0 0 1 JAN,APR,JUL,OCT ?
The following will run script on the 1st of Jan, Apr, Jul and Oct at 03:30
Alternatively, but less obvious
Will run every three months at 03:30 on the 1st of Jan,Apr,Jul and Oct.
Wikipedia has a nice explanation about how to configure Cron.
For your specific case you could run a Cron Expression to run every 3 months- obviously change the months to suit your schedule.
The accepted answer is good, thou I'd use an alternative with simpler numbers and easier to read: https://crontab.guru
Read like this: “At 00:00 on day-of-month 1 in every 3rd month.”
For JIRA (and other 6 digit cron expressions):
0 0 0 1 JAN,APR,JUL,OCT ?