Search code examples
croncron-taskcronexpression

Cron Job only specific months


I would like to set up a cron task to run a script every first day of every month except 1st january. How can I do that?

Could I try something like that: 0 0 1 2-12 * ?


Solution

  • It can be something like below:

    0 0 1 2,3,4,5,6,7,8,9,10,11,12 *