Using a script to modify another script?

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Tourless
Pro Scripter
Posts: 70
Joined: Wed Jun 14, 2017 1:53 am
Location: NY

Using a script to modify another script?

Post by Tourless » Wed Nov 27, 2024 2:53 pm

Hi Folks.

I have a script that is scheduled to start every day at 5am and it runs every hour until 5pm. Sometimes the script fails and I have to start it up again and adjust the schedule so it keeps running for the rest of the day. If I don't remember to reset the scheduled start time to 5am it won't run again until the adjusted start time is reached.

To get around this I'm thinking about writing a script that will open the offending script, navigate to the 'Run When' tab, reset the time, save, and close. The problem I'm having is I can't see if there is a way to use a script to modify a script. Anyone else run into this and how did you solve it?

jonathangoss
Newbie
Posts: 11
Joined: Fri Sep 07, 2012 8:41 am
Location: Bournemouth

Re: Using a script to modify another script?

Post by jonathangoss » Tue Dec 03, 2024 3:52 pm

hi
i would recommend you approach this another way :)
What I do, is compile a version of the script - that you can set to run via Windows Task Scheduler - and you can finesse this second script to only actually fully run, if your normal one has stalled at some point. To capture 'stalling' or full 'successful' run though, you can use MacroScheduler INI file commands

Another way to augment your script running correctly - is have your script notify you if stalled or has missed schedule and again - you can control that from a secondary compiled script

hope that helps.
Jonathan

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