@Stril I asked you to post the script here for further analysis,
but your assumption that the executed script is perfect and does not block the scheduler, makes me make this decision:
Since problem seems to be connected to internal state of your router and normal users have no way of analyzing it, it’s useless to pursue this matter over the (user) forum. I guess your next steps should be: 1) create a supout.rif file when scheduler stops executing scripts and 2) open a ticket with support@mikrotik.com.
My last suggestion.
Do this log warning at script who have max of running counter - probably it is first to have a problem.
Next is to use a total free https://deadmanssnitch.com/plans a one triger, this give you a URL… and if this URL is not run in x time then this portal give you notification that it not see new request. https://deadmanssnitch.com I use and similar projects to notify when some process not finish it’s job, general they are created to be check a linux CRON jobs but you can use them in many ways.
When you receive that e-mail notify then go to MikroTik, create a supout.rif and sent it directly to MikroTik, we at forum can only confirm that should be work and that config is ok.
@SiB, next time the scheduler start must check if previous is finished, if not warn user on some way.
pseudocode scheduler
set global varialble randomnameJhdsfg to “endscript” if the variable do not already exist
check global variable randomnameJhdsfg if it is set to “endscript”, if it is not, warn user on some way
set global varialble randomnameJhdsfg to “startscript”
run the needed script
set global varialble randomnameJhdsfg to “endscript”
I know that you do all by scripting :).
But, sometimes to not open the open door, I just add at the end of schedulers/script just one line of code like:
/tool fetch url=https://nosnch.in/00abcdef3f
/tool e-mail send to=00abcdef3f@nosnch.in
and it's all. If scripts stops working by update this remote service by url/email, Then this online service send me e-mail (in free account at end of Hour/day/week/month).
Of course OP this thread should add just log warning and watch in logs if scripts run or not... many way can be done to diagnostic this.
Thats why we like MikroTik.. by scripting
You are right, this was not correct - Sorry for that!
I was thinking, that if all the scheduler jobs stop working simultaneously, the script itself cannot be the reason.
Did you ever see, that scheduler stops executing new jobs, because one script is "blocked" and that it restarts, by re-adjusting the start-time?
THANK YOU! That’s a great help.
I changed the script with your input. I have no idea, why it did, what it had to do despite of the wrong parts…
Is there any possibility to to catch a freeze?
Currently, I am sending the list every hour and as I set timeouts to the “HONEYPOT”-list of less than one hour, there should be very few “double-send”.
How does the scheduler work, if the script did not complete before the next run?
Is there any possibility to exit a “foreach” after x entries? Is there something like an exit-condition?
fetch can cause a infinite DELAY, not infinite loop,
all is freezed, waiting fetch to finish, is not a cycle than can be autochecked if executed too much time and autoexit…
Try my script, if fail we add asyncronous fetch execution
Something like that, you can see my Snippets, on my signature the link.
Autoclose after 20s of waiting…
Q1:
Wenn using parameters start-date and start-time
does RouterOS have to recalculate Next run every single time from these parameters or only on startup?
Q2:
Would it make a performace difference to change the schedule start-time to startup ?