Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have an Ubuntu Server 12 which isn't on all day. In the /etc/crontab, I see that cron.daily, cron.weekly and cron.monthly are scheduled at times the server is off, usually.

What happens with those tasks? Will they just be skipped, or runned as soon as the server is on again?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

cron skips jobs if it isn't running at the time that they are scheduled.

However, if you have anacron installed, then daily, weekly and monthly jobs are run "at the specified intervals as closely as machine uptime permits".

In /etc/crontab, you should see references to anacron. This logic uses anacron for regular jobs, but only if anacron is installed. anacron is installed by default on Ubuntu Desktop, but not on Server, since servers are generally expected to be on 24/7. But you can install anacron on Ubuntu Server if you want the same behaviour there, and it should work as expected.

share|improve this answer
    
It works probably, but I didn't get anacron installed. I now just changed the times of cron, so that it's on moments the server is on most of the time. –  Camil Staps Jan 22 '13 at 16:16
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.