Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-08-2015, 03:18 PM   #1
Senior Member
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,040

Rep: Reputation: 76
understanding anacron (with/without cron)


I am having a hard time understanding exactly how anacron works. I can read the configuration files for both cron and anacron, and I've already configured cron. As I use a normal computer, I need anacron to do my backups, because, of course, I shut it down and I can't ensure that the computer is turned on exactly at the right time.

I've configured cron through crontab -e command, but of course I know that I can also place some scripts in /etc/cron.d/ that can be run regularly.

What I don't understand though, is how anacron refers to the SAME job that I scheduled with cron. Moreover, can anacron be used without cron, so that it runs a daily job? (and of course, so that it runs after it boots up, etc.)

For instance, after I configure in crontab a command, how could anacron take over that particular job? I hope I've been clear enough. I've searched on the internet quite a bit, and even though everybody explained very well how one can configure both cron and anacron, I still haven't been able to understand how to implement anacron in relation to (or independently of) cron.


Last edited by vincix; 07-08-2015 at 03:19 PM.
Old 07-09-2015, 07:43 AM   #2
Registered: Aug 2002
Posts: 19,210

Rep: Reputation: 2992Reputation: 2992Reputation: 2992Reputation: 2992Reputation: 2992Reputation: 2992Reputation: 2992Reputation: 2992Reputation: 2992Reputation: 2992Reputation: 2992
anacron is not a daemon but is configured as a companion program to cron. The last link below shows how they can work together to run the daily,weekly and monthly cron jobs.
Old 07-09-2015, 03:55 PM   #3
Senior Member
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,578

Rep: Reputation: 322Reputation: 322Reputation: 322Reputation: 322
A major use for anacron is to run logrotate.


crond, cronjob, crontab

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
KERNEL PANIC when cron/anacron is runnig antoniusEde Debian 2 04-07-2010 08:00 PM
Anacron job 'cron.daily' cccc Debian 15 05-20-2008 01:39 PM
Does cron/anacron retry failed tasks? enigma_0Z Linux - General 8 03-26-2008 05:58 AM
Cron/Anacron Not Working - Debian Sarge br00tal Debian 2 10-10-2005 07:41 PM
cron / anacron / fcron Will Linux - General 3 11-09-2001 02:34 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:38 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration