Community discussions

MikroTik App
 
armanalam
newbie
Topic Author
Posts: 47
Joined: Wed Nov 10, 2010 9:12 am

automatic Shutdown script

Tue Dec 14, 2010 10:18 am

hello,
anyone know how to make automatic shutdown script in routeros like:

i want to shutdown system automatic 3 times in a day 12:00pm, 5:30pm and then 9:30pm

waiting for reply

Arman
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: automatic Shutdown script

Tue Dec 14, 2010 4:33 pm

After a shutdown someone has to physically go and unplug the power source, and plug it back in. Is that really what you want, or do you want to reboot? Or just block all or some traffic for a certain period of time? For what purpose?
 
armanalam
newbie
Topic Author
Posts: 47
Joined: Wed Nov 10, 2010 9:12 am

Re: automatic Shutdown script

Tue Dec 14, 2010 5:00 pm

i just want to automatic shutdown which time i want.. i will turn it on by my self...

Arman
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: automatic Shutdown script

Tue Dec 14, 2010 5:20 pm

Then try this:
/system scheduler
add start-time=12:00 start-date=jan/1/1970 interval=1d on-event="/system shutdown"
Repeat with more schedules for the other times.

I don't know if that will work, though. The shutdown command asks for confirmation, which you cannot script. On the other hand, so does the reboot command - but it doesn't ask for confirmation when called from a script specifically so it can be scripted. So give it a shot.
 
armanalam
newbie
Topic Author
Posts: 47
Joined: Wed Nov 10, 2010 9:12 am

Re: automatic Shutdown script

Wed Dec 15, 2010 7:28 am

invalid value for argument start time
 
dssmiktik
Forum Veteran
Forum Veteran
Posts: 732
Joined: Fri Aug 17, 2007 8:42 am

Re: automatic Shutdown script

Wed Dec 15, 2010 11:01 am

invalid value for argument start time
Play with the options until you have your desired config. The basic idea is that you can shutdown via scheduler if desired using the
on-event="/system shutdown"
property (as fewi mentioned).
 
armanalam
newbie
Topic Author
Posts: 47
Joined: Wed Nov 10, 2010 9:12 am

Re: automatic Shutdown script

Thu Dec 16, 2010 9:23 pm

thank you
 
wesambhaya
just joined
Posts: 13
Joined: Thu Mar 10, 2011 12:22 am

Re: automatic Shutdown script

Mon Dec 02, 2013 12:57 am

Then try this:
/system scheduler
add start-time=12:00 start-date=jan/1/1970 interval=1d on-event="/system shutdown"
Repeat with more schedules for the other times.

I don't know if that will work, though. The shutdown command asks for confirmation, which you cannot script. On the other hand, so does the reboot command - but it doesn't ask for confirmation when called from a script specifically so it can be scripted. So give it a shot.

Hello
How can start Mikrotik router after shutdown command?
Regards
 
User avatar
skot
Long time Member
Long time Member
Posts: 584
Joined: Wed Nov 30, 2011 3:05 am

Re: automatic Shutdown script

Mon Dec 02, 2013 1:37 am

As fewi said, you have to physically unplug and plug back in the power.

Or, remotely you could use a networked UPS or power strip like the ones from digital loggers: http://www.digital-loggers.com/lpc.html
 
dssmiktik
Forum Veteran
Forum Veteran
Posts: 732
Joined: Fri Aug 17, 2007 8:42 am

Re: automatic Shutdown script

Wed Dec 04, 2013 7:32 am

If you're running on a PC, one option is to use the Wake On LAN facility offerred by most networking cards.

RouterBOARD may support this feature as well (though I have not confirmed this).

Who is online

Users browsing this forum: lovelifeproblem and 12 guests