Cron Job only specific months
Asked Answered
T

2

7

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

Tribble answered 4/12, 2015 at 10:10 Comment(0)
C
9

It can be something like below:

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

Confessional answered 4/12, 2015 at 10:23 Comment(1)
Thanks Rushabh Patel, I'll try this solution and I'll let you know.Tribble
N
7
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.

Naomanaomi answered 7/12, 2015 at 10:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.