www.centos.org Forum Index CentOS 6 - General Support Completely disable anacron but leave cron on.
|
Bottom Previous Topic Next Topic |
|
| |
|
|
|---|
| Poster | Thread |
|---|
|
Re: Completely disable anacron but leave cron on. | #24 |
|
|---|---|---|---|
|
Newbie
![]()
Joined: 2011/10/24
From
Posts: 2
|
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. |
||
Posted on: 2011/10/24 17:26
|
|||
|
Re: Completely disable anacron but leave cron on. | #23 |
|
|---|---|---|---|
|
Newbie
![]()
Joined: 2011/10/24
From
Posts: 2
|
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 |
||
Posted on: 2011/10/24 13:59
|
|||
|
Re: Completely disable anacron but leave cron on. | #22 |
|
|---|---|---|---|
|
Regular Board Member
![]()
Joined: 2009/7/10
From
Posts: 149
|
ok the problem was that cron.hourly is scheduled by /etc/cron.d/0hourly and /etc/crontab,
fixed it, thanks. |
||
Posted on: 2011/7/30 16:14
|
|||
|
Re: Completely disable anacron but leave cron on. | #21 |
|
|---|---|---|---|
|
Regular Board Member
![]()
Joined: 2007/5/6
From
Posts: 87
|
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. |
||
Posted on: 2011/7/30 10:11
|
|||
|
Re: Completely disable anacron but leave cron on. | #20 |
|
|---|---|---|---|
|
Regular Board Member
![]()
Joined: 2007/5/6
From
Posts: 87
|
/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). |
||
Posted on: 2011/7/30 9:37
|
|||
|
Re: Completely disable anacron but leave cron on. | #19 |
|
|---|---|---|---|
|
Regular Board Member
![]()
Joined: 2009/7/10
From
Posts: 149
|
the funny thing is that after installed cronie-noanacron and removed anacron
also cron.daily is executed two times. One with this: Cron <root@hostname> run-parts /etc/cron.daily and one with this: Cron <root@hostname> [ ! -f /etc/cron.hourly/0anacron ] && run-parts /etc/cron.daily |
||
Posted on: 2011/7/30 9:14
|
|||
|
Re: Completely disable anacron but leave cron on. | #18 |
|
|---|---|---|---|
|
Regular Board Member
![]()
Joined: 2009/7/10
From
Posts: 149
|
ok, disintalled the anacron but cron.hourly is executed two times every hour and I cannot understand why.
this is my crontab any idea? |
||
Posted on: 2011/7/30 0:02
|
|||
|
Re: Completely disable anacron but leave cron on. | #17 |
|
|---|---|---|---|
|
Moderator
![]()
Joined: 2007/10/22
From ~/Earth/UK/England/Suffolk
Posts: 9188
|
To illustrate what gulikoza has written, the following command sequence should be appropriate --
|
||
Posted on: 2011/7/29 23:31
|
|||
|
Re: Completely disable anacron but leave cron on. | #16 |
|
|---|---|---|---|
|
Regular Board Member
![]()
Joined: 2007/5/6
From
Posts: 87
|
It does not equal uninstalling...actually cronie-noanacron is not active if /etc/cron.hourly/0anacron exists. But after installing it, you can safely uninstall cronie-anacron without breaking rpm dependencies.
|
||
Posted on: 2011/7/29 22:46
|
|||
|
Re: Completely disable anacron but leave cron on. | #15 |
|
|---|---|---|---|
|
Regular Board Member
![]()
Joined: 2009/7/10
From
Posts: 149
|
Quote:
where do you read that cronie-noanacron equals to uninstall anacron? |
||
Posted on: 2011/7/29 19:39
|
|||
|
Re: Completely disable anacron but leave cron on. | #14 |
|
|---|---|---|---|
|
Regular Board Member
![]()
Joined: 2007/5/6
From
Posts: 87
|
Now I get it. Cronie package by itself does not execute cron.daily, weekly&monthly scripts.../etc/crontab is empty. Scripts are executed either by anacron or /etc/cron.d/dailyjobs (cronie-noanacron) so cronie package depends on either cronie-anacron or cronie-noanacron to actually function as crond did.
Installing cronie-noanacron will enable uninstalling cronie-anacron without breaking dependencies. |
||
Posted on: 2011/7/29 19:25
|
|||
|
Re: Completely disable anacron but leave cron on. | #13 |
|
|---|---|---|---|
|
Professional Board Member
![]()
Joined: 2005/8/5
From Northern Illinois, USA
Posts: 6261
|
There are 3 cronie packages.
cronie cronie-anacron cronie-noanacron cronie-anacron does include /etc/cron.hourly/0anacron Perhaps you want to install cronie-noanacron instead of cronie-anacron. |
||
Posted on: 2011/7/29 18:07
|
|||
|
Re: Completely disable anacron but leave cron on. | #12 |
|
|---|---|---|---|
|
Regular Board Member
![]()
Joined: 2009/7/10
From
Posts: 149
|
as someone saied anacron doesn't execute jobs in cron.hourly, so why my cron.hourly is executed two times every hour?
|
||
Posted on: 2011/7/29 17:36
|
|||
|
Re: Completely disable anacron but leave cron on. | #11 |
|
|---|---|---|---|
|
Moderator
![]()
Joined: 2007/10/22
From ~/Earth/UK/England/Suffolk
Posts: 9188
|
So here's an experiment for you --
Remember the golden rule -- if you break your system, you get to keep all the pieces! ![]() |
||
Posted on: 2011/7/29 16:47
|
|||
|
Re: Completely disable anacron but leave cron on. | #10 |
|
|---|---|---|---|
|
Regular Board Member
![]()
Joined: 2009/7/10
From
Posts: 149
|
Obviously I don't want to remove crond. :(
|
||
Posted on: 2011/7/29 6:27
|
|||
|
Re: Completely disable anacron but leave cron on. | #9 |
|
|---|---|---|---|
|
Moderator
![]()
Joined: 2007/10/22
From ~/Earth/UK/England/Suffolk
Posts: 9188
|
How about --
Of course, it may also want to remove cronie. ![]() |
||
Posted on: 2011/7/28 22:05
|
|||
|
Re: Completely disable anacron but leave cron on. | #8 |
|
|---|---|---|---|
|
Regular Board Member
![]()
Joined: 2009/7/10
From
Posts: 149
|
Just double checked, no duplicate entries in crontab.
|
||
Posted on: 2011/7/28 21:57
|
|||
|
Re: Completely disable anacron but leave cron on. | #7 |
|
|---|---|---|---|
|
Regular Board Member
![]()
Joined: 2009/7/10
From
Posts: 149
|
service cronie-anacron status
cronie-anacron: unrecognized service |
||
Posted on: 2011/7/28 21:54
|
|||
|
Re: Completely disable anacron but leave cron on. | #6 |
|
|---|---|---|---|
|
Moderator
![]()
Joined: 2009/9/24
From Brighton, UK
Posts: 6560
|
But anacron doesn't do anything with /etc/cron.hourly. Are you sure you don't have duplicate lines in /etc/crontab that invoke runparts twice for /etc/cron.hourly?
|
||
|
_________________
Linux/VoIP Systems Administrator |
|||
Posted on: 2011/7/28 21:54
|
|||
Top Previous Topic Next Topic |
|
|



Topic options
Print Topic
Threaded
Oldest First
nospa1










You cannot start a new topic.
You can view topic.