LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 07-08-2015, 02:18 PM   #1
vincix
Senior Member
 
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,240

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


Hello,

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.

Thanks

Last edited by vincix; 07-08-2015 at 02:19 PM.
 
Old 07-09-2015, 06:43 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,725

Rep: Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919
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.

https://wiki.gentoo.org/wiki/Cron#anacron
http://www.tuxradar.com/content/auto...on-and-anacron
 
Old 07-09-2015, 02:55 PM   #3
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,947

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


Reply

Tags
crond, cronjob, crontab



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 07:00 PM
Anacron job 'cron.daily' cccc Debian 15 05-20-2008 12:39 PM
Does cron/anacron retry failed tasks? enigma_0Z Linux - General 8 03-26-2008 04:58 AM
Cron/Anacron Not Working - Debian Sarge br00tal Debian 2 10-10-2005 06:41 PM
cron / anacron / fcron Will Linux - General 3 11-09-2001 01:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:33 PM.

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