Check Point R81.20
Hello everyone, the script won't run through Job Scheduler, although it works when I run it manually. The script is needed to track the active provider. I am currently testing this script on a test bench.
I gave 755 rights to execute the script.
configuration of Job Scheduler:
add cron job test command "/home/admin/routewatch.sh" recurrence interval minutes 02
script:
#!/bin/bash
RFILE="/var/tmp/defroute_prev"
CURR=$(/sbin/ip route show 0.0.0.0/0)
if [ -f $RFILE ]; then
DIFF=$(/usr/bin/diff $RFILE <(echo "$CURR"))
if [ -n "$DIFF" ]; then
echo "$(/bin/date): Default route changed:" >> /var/log/defroute.log
echo "$DIFF" >> /var/log/defroute.log
fi
fi
echo "$CURR" > $RFILE
Please tell me why it doesn't work through Job Scheduler and where I can view the cron logs. Thanks in advance.