6

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 * ?

Francesco
  • 387
  • 5
  • 17

2 Answers2

9

It can be something like below:

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

Rushabh Patel
  • 3,052
  • 4
  • 26
  • 58
6
Minutes [0-59]
|   Hours [0-23]
|   |   Days [1-31]
|   |   |   Months [1-12]
|   |   |   |   Days of the Week [Numeric, 0-6]
|   |   |   |   |
*   *   *   *   * home/path/to/command/the_command.sh

This is can be usefull for you to identify the usage.

Pranav Bhatt
  • 715
  • 4
  • 8