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.

What is the proper way to restart anacron? I want to set it up to restart every hour. Would a crontab entry like do the job?

sudo crontab -e
@hourly anacron

Why is anacron initially started by default from in the /etc/crontab and not in the sudo crontab?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Anacron doesn't run as a daemon, it's run from /etc/cron.d/anacron. It's there to handle longer time frames, not hourly events. The regular cron takes care of those.

If you want something to happen every hour, dump it in /etc/cron.hourly/, or schedule it via your crontab.

It's not started from root's crontab, because that's a single file, hidden in /var/spool, rather than a .d directory in /etc

share|improve this answer

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.