Community discussions

MikroTik App
 
maheshmat
just joined
Topic Author
Posts: 5
Joined: Fri Jul 15, 2016 5:58 pm

Confirm reboot in script

Thu Feb 24, 2022 9:07 am

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
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3291
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: Confirm reboot in script

Fri Feb 25, 2022 1:19 pm

Why do you need to reboot every day?

Who is online

Users browsing this forum: Ahrefs [Bot] and 14 guests