continue to run macro after computer restart not always work

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
rblack
Pro Scripter
Posts: 87
Joined: Sat Dec 22, 2007 12:39 pm

continue to run macro after computer restart not always work

Post by rblack » Sat Jun 07, 2008 10:52 am

hello,

i have written some time ago that i have problems with schedulling scripts and i still have them.

I have a MAIN script which runs every 15 minutes. I want him to 24h/7/365 - all the time when computer is on. But the computer is not alwasy on.

What do I do:
I setup the script properties Run When in the following way:
http://img61.imageshack.us/my.php?image ... ingwi4.jpg

To run every day, each 15 minutes, and to run immediately when schedule is missed. I also allow Schedulle service tu run the script.

How do i use the schedulle:
(lets suppose its the first day i am using the script)
1. When i turn on computer at 11:00 i enter in Run When properties of the script to start at 11:05 and repeat each 15 minutes.
2. I turn the computer off at 17:00 and turn on at 19:00 - everything is fine, the script runs automaticly because the schedulle was missed, but i need to change sth (so i stop it, and after changes setup RUN WHEN at 19:35)
3. Everything is fine, the script runs till the next day, and on the hour: 01:06 i automaticly turn of computer

The problem is:
I start automaticly computer the next day at hour 05:01 in the morning and want the Macro Scheduller script to run automaticly at 05:05, because the schedulle was missed. But it doesnt run. After I wake up i check whats going on I see in RunWhen that despite the fact the script was running till 01:05 i can see the last entered manually time: 19:35. So the scripts waits till 19:35 (or till 11:05) of the next day. That is not acceptable.

I tried to setup the option "Run immediately anyway" but the the script runs once, and then wait till 19:35.

To my suprise, sometimes it happens that it runs as it should, but thats unpredictable and i cannot afford an unstable schedulling.


I can imagine 3 solutions:

I: low-level-solution
Dear Marcus - autor of Macro Scheduller ;) - You could implement an option in MacroScheduller in RunWhen windows, which would be an checkbox: "Run Script if its later than", so i.e. if its now 11:00 and I would setup the run time to 10:00 and check that box, the script would run immediately after clicking OK (confirming script properties) and continue to run after each period.

II: low-level-solution
Again Marcus - you could provide an option "Run 15 minutes after previous run" which would be independent from the start-time. That soultion would be great, and would work good with scripts which are setup to run automaticly after computer boot-up and continue to run for the whole day.

III: code-solution
And here is a place for forum experts. The information about the last script-run is stored somehow in the folder where MacroScheduller is installed, or in the windows registry.
If we would just know exacly where and how, and if macro scheduller doesnt overwrite this file when is closed, then we could write script that would change the saved data to the time+5min at which the computer is turned on.

Kind regards, and please help, especially with soultion III ;)

User avatar
Marcus Tettmar
Site Admin
Posts: 7391
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Jun 09, 2008 7:08 am

If you want your schedules to run continuously you should have "run at scheduled start time" in advanced settings. NOT run immediately when missed. If you do that it will upset the cycle. Leave it to run at scheduled start time. It then calculates the next correct start time based on the repeat interval each time the software is restarted. This way the schedules always run at the correct intervals.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

rblack
Pro Scripter
Posts: 87
Joined: Sat Dec 22, 2007 12:39 pm

Post by rblack » Thu Aug 21, 2008 12:20 pm

ok, it works fine for a couple of month now, thanks

Sebastian
Newbie
Posts: 6
Joined: Wed Aug 27, 2008 8:14 am

Post by Sebastian » Wed Sep 17, 2008 2:35 am

Hi mtettmar,

Is it possible that Macro Scheduler run schedules at their allocated start time, ASWELL as run them if they are missed?

Thanks

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts