I adjust cron. The task:

*/1 * * * * date >> /tmp/date 

unloads without problems.

But if you set a specific time, for example

 12 11 * * * date >> /tmp/date 

then the new line will not be written, and in the crown log there will be the following entry:

Dec 24 11:11:01 comp crontab [14558]: (root) BEGIN EDIT (root)
Dec 24 11:11:33 comp crontab [14558]: (root) REPLACE (root)
Dec 24 11:11:33 comp crontab [14558]: (root) END EDIT (root)
Dec 24 11:12:01 comp cron [584]: (root) RELOAD (crontabs / root)

please help me figure it out

OS: Debain 8

  • Do not set the task for the next minute from the current time. The next minute, cron only rereads the config. And he begins to perform it in the next post - cronfy
  • @cronfy, it probably depends on the implementation / build / settings of the program /usr/sbin/cron . on my working machine with the implementation from isc (build for debian / wheezy) this is not observed - the task is executed immediately. and the author of the question should try to indicate a time that is more than one minute from the current one. - aleksandr barakin

2 answers 2

Perhaps, the cron process “considers” that it works in a different time zone than the syslog process (it is this that substitutes the time information in the file, an excerpt from which is given in the question).

this inconsistency could be the result, for example, of a change in the system-wide time zone, but without restarting the cron process.

then you need to restart cron :

 $ sudo service cron restart 

and try again.

    restarting the crown and the takeaway in / etc / crontab helped, now I can’t add to the username - peak time, apparently it’s true in the time zone that’s the case - it changed the other day