cron job reconnect PPPoE #126
-
How do cron jobs work that are executed at a specific time and not after booting up the UDMP? I'd like to set up a PPPoE reconnect at 3am that persists thorughout reboots and firmware updates: Would putting the above command it in /mnt/data/on_boot.sh/reconnect.sh (in an executable script with |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Save below script under /mnt/data/on_boot.d/ and change the reboot command with whatever you want to do (killall -HUP pppd). Script checks the date when it matches to a specified time 05:00:00 it executes. #!/bin/sh |
Beta Was this translation helpful? Give feedback.
Save below script under /mnt/data/on_boot.d/ and change the reboot command with whatever you want to do (killall -HUP pppd). Script checks the date when it matches to a specified time 05:00:00 it executes.
#!/bin/sh
while true;
do
DATE=
date | cut -d' ' -f4
if [[ $DATE == "05:00:00" ]]
then
reboot
sleep 30s
fi
done