LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-29-2012, 06:47 AM   #1
fantasygoat
Member
 
Registered: Sep 2009
Posts: 119

Rep: Reputation: 17
CentOS 6.2 - where's cron.daily?


For whatever reason, on most Linux distros cron.daily is run at 3-4am. Generally I move it back to midnight, but on CentOS 6.2 I cannot for the life of me figure out where it's configured!

The /etc/crontab does not have cron.daily listed, and grepping for it in /etc returns no useful results.

Where can I find the cron config for it?
 
Old 03-29-2012, 07:05 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
On RHEL6 from which CentOS 6 is derived /etc/cron.daily is a directory like it was on RHEL5 and CentOS5.
 
Old 03-29-2012, 07:20 AM   #3
fantasygoat
Member
 
Registered: Sep 2009
Posts: 119

Original Poster
Rep: Reputation: 17
Yes, but I want to change WHEN cron.daily is run. It used to be in /etc/crontab but it's not there anymore.
 
Old 03-29-2012, 07:38 AM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Sorry

It appears they made a change in 6 so that daily, hourly, weekly etc... are run in anacron rather than cron so as to avoid conflict with cron. The file you need is /etc/anacrontab

I figured this out by reviewing /etc/crontab which gave standard crontab line (as used in user crontabs that is) examples but was otherwise empty. It noted:
Quote:
# For details see man 4 crontabs
Typing "man 4 crontabs" gave the man page which says in part:
Quote:
Historically the crontab file contained configuration which called run-parts on files in cron.{daily,weekly,monthly} directories. These jobs are now run indirectly through anacron to prevent conflicts between cron and anacron. That means the anacron package has to be installed if the jobs in these directories should be running. Refer to the anacron(8) how to limit the time of day of the job execution.
Typing "man anacron" gave the man page which says in part:
Quote:
Anacron reads a list of jobs from a configuration file, /etc/anacrontab (see anacrontab(5)). This file contains the list of jobs that Anacron controls. Each job entry specifies a period in days, a delay in minutes, a unique job dentifier, and a shell command.
When I looked at /etc/anacrontab I saw at the end of the file:
Code:
#period in days   delay in minutes   job-identifier   command
1       5       cron.daily              nice run-parts /etc/cron.daily
7       25      cron.weekly             nice run-parts /etc/cron.weekly
@monthly 45     cron.monthly            nice run-parts /etc/cron.monthly
 
1 members found this post helpful.
Old 03-29-2012, 08:19 AM   #5
fantasygoat
Member
 
Registered: Sep 2009
Posts: 119

Original Poster
Rep: Reputation: 17
Based on your info, I discovered that you need to add "cronie-noanacron" and erase "cronie-anacron" to get the old behavior of setting cron.daily start times.

Thanks!
 
1 members found this post helpful.
  


Reply


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
[SOLVED] /etc/cron.daily/slocate.cron - multiple /usr/bin/updatedb degrades performance ray63 Linux - Server 2 01-05-2012 05:04 PM
cron - how to give priority to a task running in cron.daily? MeeLee Linux - Newbie 3 11-09-2010 08:41 AM
adding a perl script to cron.daily / cron.d to setup a cron job CrontabNewBIE Linux - Software 6 01-14-2008 08:16 AM
cron hourly, daily, cron.d jobs don't execute eggsmartha Linux - General 3 09-17-2007 06:37 PM
Can any one plz explain why/what for cron.d, cron.daily, cron.weekly etc are there. mavinashbabu Linux - Newbie 4 09-21-2006 01:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:03 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