Community discussions

MikroTik App

Search found 15 matches

by msteil
Wed Apr 01, 2020 12:38 am
Forum: Scripting
Topic: Days remaining in the month..
Replies: 4
Views: 578

Re: Days remaining in the month..

Thanks,

I also found after several different searches, I came across:

https://wiki.mikrotik.com/wiki/Automate ... hEndScript

While none of the options are "Eloquent" or simple I can work with what I have.

Thanks for the assistance.
by msteil
Tue Mar 31, 2020 10:33 pm
Forum: Scripting
Topic: Days remaining in the month..
Replies: 4
Views: 578

Re: Days remaining in the month..

The point is above my pay grade, In short, Because the high command wants it. Obviously, I can get the day of the month and I could code in the number of days in each month, but the there is February, and the occasional leap year. That method just seems to be a little brute force and I am hoping som...
by msteil
Tue Mar 31, 2020 7:59 pm
Forum: Scripting
Topic: Days remaining in the month..
Replies: 4
Views: 578

Days remaining in the month..

Hello All, I have been asked do write a script to gather up some information and then to a calculation based on the number of days that remain in the current calendar month, then email the result in a report. I am all good right up to having the script calculate the days remain in the month, and I a...
by msteil
Tue Jun 05, 2018 7:31 pm
Forum: Scripting
Topic: Testing to see if script is runing
Replies: 3
Views: 606

Re: Testing to see if script is runing

Thanks, forgot the KISS principal.. Any input on the second aspect, on how to call script "B" from script "A" but yet allow script "A" continue and ultimately terminate allowing script "B" continue to process? Again much like starting a process in the background in Linux? Example "Command &" Best re...
by msteil
Tue Jun 05, 2018 5:03 pm
Forum: Scripting
Topic: Testing to see if script is runing
Replies: 3
Views: 606

Testing to see if script is runing

Hello All, I am attempting to verify that a given script is not already running before attempting to start it so I don't inadvertently get multiple instances running at the same time. My attempt is as follows: :local SCRIPT "script1" :local RUNNING [/system script job get [/system script job find wh...
by msteil
Tue May 08, 2018 8:18 pm
Forum: Scripting
Topic: Route Checking before adding
Replies: 3
Views: 746

Re: Route Checking before adding

I finally got it to work, this post is so if someone else is looking for a route checking solution, and unable to find help in the archives, maybe this will help. ### # Variables ### : local INTERFACE "DHCP Interface Name" : local DESTINATION "xxx.xxx.xxx.xxx/xx" : local DISTANCE "XX" : local COMMEN...
by msteil
Tue May 08, 2018 12:43 am
Forum: Scripting
Topic: Route Checking before adding
Replies: 3
Views: 746

Re: Route Checking before adding

Thanks, this is helpful somewhat. Only problem is I can't hard code the dst-address and gateway so I made the adaption :if ([:len [/ip route find dst-address=$DIST and gateway=$DHCPGW]] >0) do={:put "Do something} else={:put "Do nothing"} Is it possible to do the route find based on a value of a var...
by msteil
Wed May 02, 2018 3:40 am
Forum: Scripting
Topic: Route Checking before adding
Replies: 3
Views: 746

Route Checking before adding

Hello, I need to add a specific static ip route when a given condition exists in a script, adding the route is no problem, but checking and preventing multiple routes that are the same from being added to the routing table, is vexing me, and I am in need of some inspiration. I have searched the arch...
by msteil
Wed Feb 01, 2017 8:21 pm
Forum: The Dude
Topic: Import/Export/Merge
Replies: 1
Views: 641

Import/Export/Merge

Hello All, I have 2 Dude servers (both 6.38.1), "A" and "B" there are some maps on "B" that I need to add to "A", prior to decommissioning "B". In the current implementations of the import/export when importing the entire existing database seems to be overwritten with the new imported database. Is t...
by msteil
Wed Aug 24, 2016 8:12 pm
Forum: Scripting
Topic: Scripting/Advanced scheduling
Replies: 0
Views: 411

Scripting/Advanced scheduling

Hello all, I have been asked to make a 2011 turn the local wireless interface on and off according to a businesses office hours, and example being Open (Wireless on) M-T 9AM to 5 PM, Wed 8AM to 12PM, Th-F 9AM to 5PM, Sat 8AM to 2 PM, Sunday Closed. This appears to be too advanced for the scheduler, ...
by msteil
Sun Aug 24, 2014 12:49 am
Forum: Scripting
Topic: Uptime script
Replies: 8
Views: 4841

Re: Uptime script

Yes, I suppose I could have done as you describe, and then have some netwatch items that get disabled and others enabled and hour after a re-boot but when the netwatch item is enabled it tests the condition and it executes the event based on the up/down condition. So I still needed to test to see if...
by msteil
Sun Aug 24, 2014 12:20 am
Forum: Scripting
Topic: Uptime script
Replies: 8
Views: 4841

Re: Uptime script

Nothing, but it is in association with a netwatch, on a wireless link. If the router was just re-booted I want to wait an hour before I do some housekeeping, and if the link just flaps then I'm doing other stuff.
by msteil
Fri Aug 22, 2014 11:39 pm
Forum: Scripting
Topic: Uptime script
Replies: 8
Views: 4841

Re: Uptime script

Thanks for the reply, I am certain I tried "/system resource get uptime" before I posted but I must have had some error in the syntax or it was one of those things where the error was so obvious I could not see it. Anyhow it works now, and here is what I came up with. # Delay needed to get everythin...
by msteil
Sun Aug 17, 2014 5:00 pm
Forum: Scripting
Topic: Uptime script
Replies: 8
Views: 4841

Uptime script

Hello All, I am attempting to write a ROS script where based on the system uptime I need to turn up (disable=no) an interface. The only thing that seems to be eluding me is actually getting the uptime value into a variable I can work with in the script. Is there a specific "get" that I can get just ...
by msteil
Tue May 20, 2014 5:05 am
Forum: Scripting
Topic: Health/Voltage shutdown script
Replies: 3
Views: 2682

Health/Voltage shutdown script

Hello, Does/has anyone ever tried to create a script that runs continuously monitoring the health voltage, and at a specified voltage execute a graceful shutdown of the system? I have venue where we need to create a WI-FI mesh network for an event, but there is no readily available source of electri...