Completely disable anacron but leave cron on.
-
- Posts: 252
- Joined: 2009/07/10 09:43:13
- Contact:
Completely disable anacron but leave cron on.
Hi all...
Hi want to completely disable anacron but I don't want to disturb crond.
To do it I edited /etc/anacrontab and commented those lines
#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
Then I removed the 0anacron file in cron.hourly...
Doing that succesfully disabled anacron for cron.weekly and cron.daily since this tasks are executed from crond only.
The problem is that cron.hourly is executed two times, one time from crond and one time from anacron...
How can I completely disable anacron?
Hi want to completely disable anacron but I don't want to disturb crond.
To do it I edited /etc/anacrontab and commented those lines
#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
Then I removed the 0anacron file in cron.hourly...
Doing that succesfully disabled anacron for cron.weekly and cron.daily since this tasks are executed from crond only.
The problem is that cron.hourly is executed two times, one time from crond and one time from anacron...
How can I completely disable anacron?
Re: Completely disable anacron but leave cron on.
As root [code]chkconfig anacron off
service anacron stop[/code] should be all you need.
service anacron stop[/code] should be all you need.
-
- Posts: 252
- Joined: 2009/07/10 09:43:13
- Contact:
Re: Completely disable anacron but leave cron on.
[quote]
pjwelsh wrote:
As root [code]chkconfig anacron off
service anacron stop[/code] should be all you need.[/quote]
service anacron stop
anacron: unrecognized service
its strange...
if anacron is stopped why the script on cron.hourly is executed two times?
pjwelsh wrote:
As root [code]chkconfig anacron off
service anacron stop[/code] should be all you need.[/quote]
service anacron stop
anacron: unrecognized service
its strange...
if anacron is stopped why the script on cron.hourly is executed two times?
-
- Posts: 252
- Joined: 2009/07/10 09:43:13
- Contact:
Re: Completely disable anacron but leave cron on.
what is the name of anacron service?
I cannot neither do
service anacron start
since the service is not recognized.
I cannot neither do
service anacron start
since the service is not recognized.
- AlanBartlett
- Forum Moderator
- Posts: 9345
- Joined: 2007/10/22 11:30:09
- Location: ~/Earth/UK/England/Suffolk
- Contact:
Re: Completely disable anacron but leave cron on.
On a [i]RHEL 6.1[/i] system, I see --
[code]
[ajb@Duo2 ~]$ rpm -qa \*cron\*
crontabs-1.10-33.el6.noarch
cronie-1.4.4-7.el6.x86_64
cronie-anacron-1.4.4-7.el6.x86_64
[ajb@Duo2 ~]$ sudo yum info cronie cronie-anacron
[i]<snip>[/i]
Installed Packages
Name : cronie
Arch : x86_64
Version : 1.4.4
Release : 7.el6
Size : 166 k
Repo : installed
From repo : rhel-x86_64-server-6
Summary : Cron daemon for executing programs at set times
URL : https://fedorahosted.org/cronie
License : MIT and BSD and ISC and GPLv2
Description : Cronie contains the standard UNIX daemon crond that runs specified programs at
: scheduled times and related tools. It is a fork of the original vixie-cron and
: has security and configuration enhancements like the ability to use pam and
: SELinux.
Name : cronie-anacron
Arch : x86_64
Version : 1.4.4
Release : 7.el6
Size : 43 k
Repo : installed
From repo : rhel-x86_64-server-6
Summary : Utility for running regular jobs
URL : https://fedorahosted.org/cronie
License : MIT and BSD and ISC and GPLv2
Description : Anacron became part of cronie. Anacron is used only for running regular jobs.
: The default settings execute regular jobs by anacron, however this could be
: overloaded in settings.
[ajb@Duo2 ~]$ rpm -ql cronie
/etc/cron.d
/etc/cron.d/0hourly
/etc/cron.deny
/etc/pam.d/crond
/etc/rc.d/init.d/crond
/etc/sysconfig/crond
/usr/bin/crontab
/usr/sbin/crond
/usr/share/doc/cronie-1.4.4
/usr/share/doc/cronie-1.4.4/AUTHORS
/usr/share/doc/cronie-1.4.4/COPYING
/usr/share/doc/cronie-1.4.4/ChangeLog
/usr/share/doc/cronie-1.4.4/INSTALL
/usr/share/doc/cronie-1.4.4/README
/usr/share/man/man1/crontab.1.gz
/usr/share/man/man5/crontab.5.gz
/usr/share/man/man8/cron.8.gz
/usr/share/man/man8/crond.8.gz
/var/spool/cron
[ajb@Duo2 ~]$ rpm -ql cronie-anacron
/etc/anacrontab
/etc/cron.hourly/0anacron
/usr/sbin/anacron
/usr/share/man/man5/anacrontab.5.gz
/usr/share/man/man8/anacron.8.gz
/var/spool/anacron
/var/spool/anacron/cron.daily
/var/spool/anacron/cron.monthly
/var/spool/anacron/cron.weekly
[ajb@Duo2 ~]$
[/code]
[code]
[ajb@Duo2 ~]$ rpm -qa \*cron\*
crontabs-1.10-33.el6.noarch
cronie-1.4.4-7.el6.x86_64
cronie-anacron-1.4.4-7.el6.x86_64
[ajb@Duo2 ~]$ sudo yum info cronie cronie-anacron
[i]<snip>[/i]
Installed Packages
Name : cronie
Arch : x86_64
Version : 1.4.4
Release : 7.el6
Size : 166 k
Repo : installed
From repo : rhel-x86_64-server-6
Summary : Cron daemon for executing programs at set times
URL : https://fedorahosted.org/cronie
License : MIT and BSD and ISC and GPLv2
Description : Cronie contains the standard UNIX daemon crond that runs specified programs at
: scheduled times and related tools. It is a fork of the original vixie-cron and
: has security and configuration enhancements like the ability to use pam and
: SELinux.
Name : cronie-anacron
Arch : x86_64
Version : 1.4.4
Release : 7.el6
Size : 43 k
Repo : installed
From repo : rhel-x86_64-server-6
Summary : Utility for running regular jobs
URL : https://fedorahosted.org/cronie
License : MIT and BSD and ISC and GPLv2
Description : Anacron became part of cronie. Anacron is used only for running regular jobs.
: The default settings execute regular jobs by anacron, however this could be
: overloaded in settings.
[ajb@Duo2 ~]$ rpm -ql cronie
/etc/cron.d
/etc/cron.d/0hourly
/etc/cron.deny
/etc/pam.d/crond
/etc/rc.d/init.d/crond
/etc/sysconfig/crond
/usr/bin/crontab
/usr/sbin/crond
/usr/share/doc/cronie-1.4.4
/usr/share/doc/cronie-1.4.4/AUTHORS
/usr/share/doc/cronie-1.4.4/COPYING
/usr/share/doc/cronie-1.4.4/ChangeLog
/usr/share/doc/cronie-1.4.4/INSTALL
/usr/share/doc/cronie-1.4.4/README
/usr/share/man/man1/crontab.1.gz
/usr/share/man/man5/crontab.5.gz
/usr/share/man/man8/cron.8.gz
/usr/share/man/man8/crond.8.gz
/var/spool/cron
[ajb@Duo2 ~]$ rpm -ql cronie-anacron
/etc/anacrontab
/etc/cron.hourly/0anacron
/usr/sbin/anacron
/usr/share/man/man5/anacrontab.5.gz
/usr/share/man/man8/anacron.8.gz
/var/spool/anacron
/var/spool/anacron/cron.daily
/var/spool/anacron/cron.monthly
/var/spool/anacron/cron.weekly
[ajb@Duo2 ~]$
[/code]
Re: Completely disable anacron but leave cron on.
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?
-
- Posts: 252
- Joined: 2009/07/10 09:43:13
- Contact:
Re: Completely disable anacron but leave cron on.
service cronie-anacron status
cronie-anacron: unrecognized service
cronie-anacron: unrecognized service
-
- Posts: 252
- Joined: 2009/07/10 09:43:13
- Contact:
Re: Completely disable anacron but leave cron on.
Just double checked, no duplicate entries in crontab.
- AlanBartlett
- Forum Moderator
- Posts: 9345
- Joined: 2007/10/22 11:30:09
- Location: ~/Earth/UK/England/Suffolk
- Contact:
Re: Completely disable anacron but leave cron on.
How about --
[code]
[b]sudo yum remove cronie-anacron[/b]
[/code]
Of course, it may also want to remove [i]cronie[/i]. :roll:
[code]
[b]sudo yum remove cronie-anacron[/b]
[/code]
Of course, it may also want to remove [i]cronie[/i]. :roll:
-
- Posts: 252
- Joined: 2009/07/10 09:43:13
- Contact:
Re: Completely disable anacron but leave cron on.
Obviously I don't want to remove crond. :(