Hi
If you have a scheduled task set to run once at 5pm but then the server is stopped and started during the time window (reduced to 15 minutes) it will re-run the task. Is there anyway to stop this and its causing issues and duplicated reports to be sent to clients which doesn’t make us look good
We have 100+ jobs running through so can’t be expected to keep track on what time each one runs and avoid that time when making changes live.
James
You’d have to keep track through a file.
The beginning of the process should check for the existance of a file that sole purpose is to show that the process just ran. At the end of the process, you create that file.
Another process, executed in the next time window, delete the file.
This way, should a service re-start occurs, the file is proof that the process ran.
Thanks, I did think that but was hoping there was a cleaner way,
James
Well if you think of it, upon services restart, the memory is freed so that is the only way to do this since files stay after a reboot.
Hi
Yeah I’m just used to workflow tools like GMC Automation\windows scheduled tasks where you can set a specific time rather than saying run once in in window
James
Since your time division is 15 minutes, which is 900 seconds, you could try setting your polling interval to 895, so it would only run in the last 5 seconds of the 15 minutes. This way, should you restart your services, it wouldn’t rerun.
The logic is sound but I haven’t tried it.