export PATH for cronjob to work and redirect script's error output to the log file too
authorBarış Metin <Talip-Baris.Metin@sophia.inria.fr>
Wed, 1 Jul 2009 16:15:15 +0000 (16:15 +0000)
committerBarış Metin <Talip-Baris.Metin@sophia.inria.fr>
Wed, 1 Jul 2009 16:15:15 +0000 (16:15 +0000)
automate-default.sh
monitor-server.cron

index 66a42d9..8b18032 100755 (executable)
@@ -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
index 73f0fdf..da9dea1 100644 (file)
@@ -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