/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).
Completely disable anacron but leave cron on.
Re: Completely disable anacron but leave cron on.
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.
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.
-
- Posts: 252
- Joined: 2009/07/10 09:43:13
- Contact:
Re: Completely disable anacron but leave cron on.
ok the problem was that cron.hourly is scheduled by /etc/cron.d/0hourly and /etc/crontab,
fixed it, thanks.
fixed it, thanks.
Re: Completely disable anacron but leave cron on.
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
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
Re: Completely disable anacron but leave cron on.
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.
I'd apparently screwed up when changing times in dailyjobs and had left out one of the asterisks in the line for cron.daily.
Re: Completely disable anacron but leave cron on.
[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 ?
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 ?