[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: restart cron in Solaris
From: |
Ted Zlatanov |
Subject: |
Re: restart cron in Solaris |
Date: |
Fri, 07 Dec 2001 08:51:51 -0500 |
User-agent: |
Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1 (i386-redhat-linux-gnu) |
Daniel Nilsson <dlist@nlsn.nu> writes:
> Does sending HUP to cron really reread crontabs in Solaris?
>
> Ive tried:
>
> "cron" signal=hup inform=false
>
> But it doesnt work...
>
> How are you editing crontabs? (crontab -l > /tmp/aaa;vi /tmp/aaa;crontab
> /tmp/aaa) ???
Note that this doesn't work for fcron, anacron, and such without some
work. But it's been behaving well at our site. Defining the
RestartCrontab class didn't work reliably, so I always resubmit the
crontab (feeding a crontab to cron is the most reliable way of
ensuring it will recognize it, in my experience - the HUP signal is
the second most reliable way).
Parts of this are based on past discussion on the cfengine mailing
list.
Ted
------------------------------
control:
# where is the crontab command hiding?
linux|hpux|irix|irix64|freebsd::crontab = ( /usr/bin/crontab )
hpux10|aix|sun4|solaris:: crontab = ( /bin/crontab )
osf:: crontab = ( /usr/ucb/crontab )
# where is the root crontab file hiding?
aix|hpux:: root_crontab = ( /usr/spool/cron/crontabs/root )
hpux10|irix|irix64|osf|sun4|solaris::
root_crontab = ( /var/spool/cron/crontabs/root )
linux:: root_crontab = ( /var/spool/cron/root )
ultrix|freebsd:: root_crontab = ( /etc/crontab )
editfiles:
{ $(root_crontab)
SetLine "0 * * * * /etc/cfengine/cfhourly"
AppendIfNoLineMatching ".*cfhourly.*"
SetLine "* * * * * /etc/cfengine/cfminute"
AppendIfNoLineMatching ".*cfminute.*"
DefineClasses "RestartCrontab"
}
shellcommands:
# this will always be run, because DefineClasses doesn't work right
# RestartCrontab::
any::
"$(crontab) $(root_crontab)"
- encrypt.c: In function `LoadSecretKeys':, Rune Mossige, 2001/12/05
- Re: encrypt.c: In function `LoadSecretKeys':, Rune Mossige, 2001/12/06
- Re: encrypt.c: In function `LoadSecretKeys':, Eric Methorst, 2001/12/07
- restart cron in Solaris, Daniel Nilsson, 2001/12/07
- Re: restart cron in Solaris,
Ted Zlatanov <=
- Re: restart cron in Solaris, Alan Silver, 2001/12/07
- Re: restart cron in Solaris, Katherine Morris, 2001/12/07
- Re: restart cron in Solaris, Daniel Nilsson, 2001/12/10
- Re: restart cron in Solaris, Darren Dunham, 2001/12/10
- Re: restart cron in Solaris, Ted Zlatanov, 2001/12/10
- Re: restart cron in Solaris, Dan Zubairi, 2001/12/10
- Re: restart cron in Solaris, Katherine Morris, 2001/12/10
- Re: restart cron in Solaris, Katherine Morris, 2001/12/10
- Re: restart cron in Solaris, Daniel Nilsson, 2001/12/11
- Re: restart cron in Solaris, Katherine Morris, 2001/12/12