my question is quite simple but I have not been able to figure this one out.
Just a quick overview -
I am using /netwatch to update a mysql DB with some parameters i am passing along from my MkTik router
Problem#1 = the netwatch UP event command does not seem to update when HOST is UP so I would have to manually fire it. I figured out by using /tool netwatch enable 0 it would force an update. So i thought hey cool i just use Scheduler to run this command every minute to update my DB?
From scheduler that does not seem to work either, so I thought ok then lets call a script from scheduler that will run the above command? but i cant get that part to work either…
All i want is this:
RUN the following console command every minute:: (or some other way forcing the UP script (netwatch) to run)
BTW, my netwatch runs both up and down scripts ok, but only on network status change.
Same issue here since i need this to run every 5 min and update the DB every 5 min.
:::EDIT EDIT EDIT:::
I figured it out guys!
So for anyone wondering here is what I did. (Utilities winbox)
Use the if() script that was posted. (script is called “update_DB”)
Call the tool command using :tool
Use Scheduler and run it every minute - works like a charm in the “on Event” box just put the name of the script you want to run , no need for /system run etc, in my case “update_DB”