I created a cron job using * */2 * * * schedule. Can anyone tell me what schedule this refers to?
I guess it should execute every 2 hours, but it seems to execute every minute.
|
|
|
This is how a cron job is laid out:
|
|||
|
|
|
Cron jobs will execute any time there is a match condition on the time spec. An asterisk ( So, what you've got with your time spec is:
The fields are:
So, what you've specified, in english, is "run once per minute during even numbered hours". Sounds kind of silly, but In order to make it run only once, every other hour you need to set the minute field to some specific number. Any number As many people have already suggested, the following is probably closer to what you want:
|
|||
|
|
|
I believe you want |
|||
|
|
|
Putting your cronjob like that will make it run every minute (first If you want to run it every 2 hours you should explicitly put the minute counter to
|
|||
|
|