From: Barış Metin Date: Wed, 1 Jul 2009 16:15:15 +0000 (+0000) Subject: export PATH for cronjob to work and redirect script's error output to the log file too X-Git-Tag: Monitor-3.0-19~23 X-Git-Url: http://git.onelab.eu/?p=monitor.git;a=commitdiff_plain;h=c0c256ab8a054cfe53a1a32a569a6cc82f5a4a22 export PATH for cronjob to work and redirect script's error output to the log file too --- diff --git a/automate-default.sh b/automate-default.sh index 66a42d9..8b18032 100755 --- a/automate-default.sh +++ b/automate-default.sh @@ -1,5 +1,7 @@ #!/bin/bash +export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin + # NOTE: Must be an absolute path to guarantee it is read. INSTALLPATH=/usr/share/monitor/ # Generate an 'sh' style file full of variables in monitor.conf diff --git a/monitor-server.cron b/monitor-server.cron index 73f0fdf..da9dea1 100644 --- a/monitor-server.cron +++ b/monitor-server.cron @@ -1,6 +1,6 @@ # Runs every three hours to poll all nodes and PCUs, as well as take some # automated actions for debug nodes. -01 * * * * root /usr/share/monitor/automate-default.sh 2>&1 > /usr/share/monitor/monitor.log -#30 * * * * root /etc/plc.d/monitor sync 2>&1 >> /var/log/monitorsync.log +01 * * * * root /usr/share/monitor/automate-default.sh > /usr/share/monitor/monitor.log 2>&1 +#30 * * * * root /etc/plc.d/monitor sync >> /var/log/monitorsync.log 2>&1