[CentOS] Re: cat cron jobs into crontab
ssilva at sgvwater.com
Tue Mar 13 16:03:06 UTC 2007
Akemi Yagi spake the following on 3/12/2007 6:58 PM:
> On Mon, 12 Mar 2007 20:58:46 -0400, Matt Hyclak wrote:
>> On Mon, Mar 12, 2007 at 05:21:47PM -0800, Karl R. Balsmeier enlightened
>>> What's the best/safest way to "cat" the following job into crontab?
>>> */3 * * * * /usr/lib64/nagios/plugins/check_megaraid_passive.sh >
>>> /dev/null 2>&1
>>> I am used to doing this manually via crontab -e, but now I simply have
>>> too many centos servers to build in a given week (get to toss another
>>> 120K at some more 2U chenbro/tyan/amd64's -w000ooo).
>> echo '*/3 * * * * /usr/lib64/nagios/plugins/check_megaraid_passive.sh >
>> /dev/null 2>&1' > /etc/cron.d/check_megaraid_passive.sh
>> (Watch for wrapping, of course).
> Isn't this supposed to be written to /etc/crontab (if root) or
> to /var/spool/cron/username (if a user) ? Or maybe I am mistaken?
Dropping a script into cron.d is the safer way of scripting a cron job.
You are less likely to damage something if a script errs.
MailScanner is like deodorant...
You hope everybody uses it, and
you notice quickly if they don't!!!!
More information about the CentOS