It will restart the PPPoE connection every day at 7a.m
The benefit to using the task-scheduler
is that your commands get saved in config
folder which ensures that they get copied over during firmware upgrades.
cd /config/user-data && sudo mkdir scripts && sudo chown root scripts && cd scripts
sudo touch restart-internet.sh && sudo chown root restart-internet.sh
sudo chmod 0755 restart-internet.sh
Add the restart-internet.sh
content inside the created file:
sudo vi restart-internet.sh
configure
set system task-scheduler task restartInternet
set system task-scheduler task restartInternet crontab-spec '58 9 * * *'
set system task-scheduler task restartInternet executable path /config/user-data/scripts/restart-internet.sh
commit
save
Also, you can check that those commands actually created the cronjob in /etc/cron.d/vyatta-crontab
.
cat /etc/cron.d/vyatta-crontab