Completely disable anacron but leave cron on.

General support questions
gulikoza
Posts: 188
Joined: 2007/05/06 20:15:23

Re: Completely disable anacron but leave cron on.

Post by gulikoza » 2011/07/30 09:37:09

/etc/crontab file does not contain run-parts on my system. You must have added that yourself. That is probably also the reason why cron.hourly is run twice.
On a clean Centos6, /etc/crontab will be empty, cron.hourly is executed by /etc/cron.d/0hourly and cron.daily, monthly and weekly are executed by either anacron (if cronie-anacron is installed) or /etc/cron.d/dailyjobs (if cronie-noanacron is used).

gulikoza
Posts: 188
Joined: 2007/05/06 20:15:23

Re: Completely disable anacron but leave cron on.

Post by gulikoza » 2011/07/30 10:11:11

One thing to note is that with default cronie-anacron installed, the system relies entirely on anacron and it's settings to run cron.daily, weekly and monthly scripts. Only cron.hourly is directly executed by crond. This is a difference from "classic" linux system where those scripts are executed from /etc/crontab. I assume this is because anacron adds a random delay and serializes job execution so that the scripts don't run at the same time. It would also be a mistake to forcefully remove anacron...

There's a lot of differences in how the system works in C6 (upstart instead of init and all the other differences...) so it will take some time to get used to doing things differently.

sblantipodi
Posts: 252
Joined: 2009/07/10 09:43:13
Contact:

Re: Completely disable anacron but leave cron on.

Post by sblantipodi » 2011/07/30 16:14:11

ok the problem was that cron.hourly is scheduled by /etc/cron.d/0hourly and /etc/crontab,
fixed it, thanks.

tdexter
Posts: 2
Joined: 2011/10/24 13:42:19

Re: Completely disable anacron but leave cron on.

Post by tdexter » 2011/10/24 13:59:49

I'm attempting to disable anacron on a new CentOS 6 install as described in this thread. I've installed cronie-noanacron and removed cronie-anacron.

Just as I expected from what I've read here, /etc/cron.hourly/0anacron is no longer there and the install of cronie-noanacron added /etc/cron.d/dailyjobs.

After I did that I restarted crond. Last night none of the jobs in /etc/cron.daily ran. Is there something I'm missing here? Does something else need to be changed to make the steps defined in /etc/cron.d/dailyjobs run?

What confuses me more is the fact that the RHEL6 documentation says that if you remove cronie-anacron you can schedule jobs in crontab, which is quite different from anything described here. Is that actually the case in RHEL6 and not in CentOS 6? crontab is supposed to be empty correct?

I can't imagine what I'm missing.

Tom

tdexter
Posts: 2
Joined: 2011/10/24 13:42:19

Re: Completely disable anacron but leave cron on.

Post by tdexter » 2011/10/24 17:26:52

Duh...never mind. Pilot error...

I'd apparently screwed up when changing times in dailyjobs and had left out one of the asterisks in the line for cron.daily.

nospa1
Posts: 17
Joined: 2010/09/21 18:03:12

Re: Completely disable anacron but leave cron on.

Post by nospa1 » 2012/01/21 09:46:26

[quote]
sblantipodi wrote:
ok the problem was that cron.hourly is scheduled by /etc/cron.d/0hourly and /etc/crontab,
fixed it, thanks.[/quote]

Hi

Have you removed file /etc/cron.d/0hourly or rather you have removed cron.hourly from /etc/crontab?

If you have only removed entrie from /etc/crontab and left 0hourly - could you please post content of 0hourly ?

Post Reply