From c0c256ab8a054cfe53a1a32a569a6cc82f5a4a22 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bar=C4=B1=C5=9F=20Metin?= Date: Wed, 1 Jul 2009 16:15:15 +0000 Subject: [PATCH] export PATH for cronjob to work and redirect script's error output to the log file too --- automate-default.sh | 2 ++ monitor-server.cron | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) 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 -- 2.43.0