3

So just to sketch the outlines of this problem, i made an cronjob that should be executed on each full hour like this: 0:00, 1:00, 2:00. In all the manuals/tutorials i found on the internet they say putting in a crontab like this would do the trick:

0 * * * * echo "HourlyCronJobTest" > /home/sajvanderzeeuw/myCRON.txt

Unfortunately this does not work. Every other number of minutes does work. E.g. the job below which creates the text file at every 35 minutes of the hour. 0:35, 1:35 etc etc.

35 * * * * echo "HalfHourCronjobTest" > /home/sajvanderzeeuw/myCRON2.txt

So there is a easy way to circumvent this by simple doing it at 1 minute past the hour. But i just wonder if someone can show me why this happens.

13
  • What's the output of uname -a?
    – Gx1sptDTDa
    Commented Jul 20, 2015 at 14:23
  • @Gx1sptDTDa Linux shark 3.13.0-55-generic #94-Ubuntu SMP Thu Jun 18 00:27:10 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux Commented Jul 20, 2015 at 14:25
  • 1
    look strange, this should work, try @hourly (in place of "0 * * * *")
    – Archemar
    Commented Jul 20, 2015 at 14:25
  • I know that this is also possible. Trying as we speak. But still this does not declare why it doesnt work for 0 * * * * Commented Jul 20, 2015 at 14:29
  • Very strange. Which version of cron do you have installed?
    – mjturner
    Commented Jul 20, 2015 at 15:02

1 Answer 1

0

Problem is solved. It was not due to a bug in Cron but it was because the LDAP client of our compute cluster was restarted on the hour. So therefore all CRONjobs scheduled at this time weren't executed, because the cluster couldn't recognize user IDs.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .