2

I have this line in my /etc/crontab:

47 6    * * Sat root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )

So the cron.weekly should be started every Saturday at 6:47 AM right? But it starts each Wednesday instead. I restarted the cron service. What am I doing wrong? Thanks.

  • 2
    Might sound like a silly question, but... is the date and time set correctly? :) – Flup Jul 15 '14 at 7:27
  • 2
    Does this system run continuously ? – user9517 supports GoFundMonica Jul 15 '14 at 7:37
  • 1
    Your cron isn't being run by cron. It's being run by anacron. anacron runs crontabs that aren't run by cron. Does your system have an anacron job scheduled for cron.weekly? If not, anacron probably doesn't know that the weekly cron is being run successfully (the anacron job in cron.weekly normally informs anacron that the regular cron job was run). – hrunting Jul 16 '14 at 2:34
  • 1
    @hrunting read the cron job. The cron.weekly job only gets run if anacron isn't available... Read the comment with the log message in. The system is working as designed. – user9517 supports GoFundMonica Jul 16 '14 at 6:14
  • 2
    @Iain you're right, I missed that. Cron's working as specified, although it appears it's not quite as valk wishes it were designed. Anacron runs the cron (which isn't necessarily going to happen on cron's schedule). – hrunting Jul 17 '14 at 2:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.