On Mon, Mar 12, 2007 at 05:21:47PM -0800, Karl R. Balsmeier enlightened us:> 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). Matt -- Matt Hyclak Department of Mathematics Department of Social Work Ohio University (740) 593-1263
Hi, 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). -karlski
Karl R. Balsmeier wrote:> > 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).crontab (and the files in /var/spool/cron) are for manual updates to the scheduled jobs. For automated updates, the "official" way is /etc/cron.d So, if you want to automate the creation/removal of cron jobs, just create/remove files in /etc/cron.d crontab and the associated files are NOT the appropriate tool for that purpose. Just create a file called /etc/cron.d/nagios-megaraid containing the line you specified. -- Florin Andrei http://florin.myip.org/