Community discussions

MUM Europe 2020
 
1001001
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 70
Joined: Mon Sep 24, 2012 12:46 pm

shutting down interfaces at a specific time

Fri Sep 25, 2015 12:14 pm

Hello everybody,

would it be possible to write a script that shutsdown an interface, lets say between 2200h and 0600h everyday?
If yes does somebody out there have a code snippet i can use to get started?

Best regards

1001001
 
User avatar
PaulsMT
MikroTik Support
MikroTik Support
Posts: 283
Joined: Tue Feb 10, 2015 3:21 pm

Re: shutting down interfaces at a specific time

Fri Sep 25, 2015 1:29 pm

If You want to run only one command on specific time, you don't need a script, you can just add scheduler:

to disable interface at 22:00
/system scheduler add start-time=22:00:00 on-event={:interface ethernet disable ether5}

second scheduler to enable interface at 6:00
/system scheduler add start-time=06:00:00 on-event={:interface ethernet enable ether5}
 
1001001
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 70
Joined: Mon Sep 24, 2012 12:46 pm

Re: shutting down interfaces at a specific time

Fri Sep 25, 2015 1:43 pm

Thanks for your answer.
What if we had to do this at different times on different days?

Best regards

1001001
 
freemannnn
Long time Member
Long time Member
Posts: 669
Joined: Sun Oct 13, 2013 7:29 pm

Re: shutting down interfaces at a specific time

Sat Sep 26, 2015 12:58 pm

you have to make schedules that start for example 26-09-2015 "saturday" and repeat "weekly" so it runs every week same day

Who is online

Users browsing this forum: dirman, djexit and 13 guests