Pregunta

I am having trouble understanding how dates and days work together in a cron job.

Say I have the following command:

0 23 5 1 3 COMMAND

This translates to 23:00, on 5th of January, on Wednesday.

The problem is, that January 5th is a Sunday. How exactly will this command work out? Is the command going to be executed for both January 5th AND for every Wednesday on the month January? Or will it execute just the '5 1' bit?

I am really sorry if it is a really basic question and possibly stupid but to me it really does not make any sense.

Thank you in advance!

¿Fue útil?

Solución

Commands are executed by cron when the minute, hour, and month of year fields match the current time, and at least one of the two day fields (day of month, or day of week) match

Ref: Man Page

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top