Page 1 of 1

Confirm reboot in script

Posted: Thu Feb 24, 2022 9:07 am
by maheshmat
Hi
I want to reboot my router daily at 7 AM.
I write a schedule and It was working fine:
/system scheduler
add interval=1d name=daily-reboot on-event="/system reboot" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=feb/01/2020 start-time=07:00:00
But someday after updating the router (currently 6.49.3), this stops working.
I try to run the command and It asking me for confirming the action by pressing y.
/system reboot
Reboot, yes? [y/N]:

How can I force reboot or pipe "y" to the command in my schedule?
I want something like
/system reboot --force
or
echo y | /system reboot

Re: Confirm reboot in script

Posted: Fri Feb 25, 2022 1:19 pm
by Jotne
Why do you need to reboot every day?