1
24.1 Legacy Series / Can someone help check why my customized cron job not run?
« on: June 11, 2024, 07:21:38 pm »
I created a customized cron job, I can see it and pick it from "
System: Settings: Cron
" and create a cron jobs.
However it seems it never run - here is my script:
/sbin/ping -c 1 8.8.8.8 > /dev/null;
if [ $? != 0 ]; then
/sbin/ifconfig ue0 down
/sbin/ifconfig ue0 up
echo logger "renewed dhcp lease"
echo "renewed DHCP" >> WAN.log
fi
echo `date` >> WAN.log
manually run it I can see the date/time string is added to log file, but I test the cron job run every 10 minutes but I dont see the log is updated.
Can anyone help and let me know where the issue is?
Thanks
Shawn
System: Settings: Cron
" and create a cron jobs.
However it seems it never run - here is my script:
/sbin/ping -c 1 8.8.8.8 > /dev/null;
if [ $? != 0 ]; then
/sbin/ifconfig ue0 down
/sbin/ifconfig ue0 up
echo logger "renewed dhcp lease"
echo "renewed DHCP" >> WAN.log
fi
echo `date` >> WAN.log
manually run it I can see the date/time string is added to log file, but I test the cron job run every 10 minutes but I dont see the log is updated.
Can anyone help and let me know where the issue is?
Thanks
Shawn