Results 1 to 2 of 2
Thread: Cancel admin script?
09-13-2011, 10:45 AM #1
- Join Date
- Dec 2009
- Thanked 0 Times in 0 Posts
Cancel admin script?
Im on a Windows server that sometimes run very slow and the admin script doesnt finish until next backup session start.
I have put some of the tasks in the script on a timelimit to prevent it from running more then 16 hours. But sometimes that doesnt work and the script is still running the next morning when another admin script is supposed to start.
I have tried to restart the TSM server when this happen but it only result in starting the script that was supposed to run earlier that morning. I.e it wont finish until next backup session.
Since the tasks/process in the script is serial it can take several hours to cancel them, wich I need to do to get a "clean start" the next night.
Is there any way to stop the whole script instead of canceling one process at a time?
And before anyone says "get a faster machine", its in the budget but will still take some time until implemented
09-13-2011, 11:17 AM #2
- Join Date
- Dec 2003
- Czech Republic
- Thanked 94 Times in 93 Posts
as far as I know you cannot stop the script processing.
Automating the process for cancelling all the maintenance jobs before backup starts can be very complicated.
What about this (just a mental exercise )
a) For each task in the original script create a separate script - the last line of these scripts should update schedule definition for the next script to be run after 5minutes from now with starttdate=today and onetime period (do not modify the "ACTIVE=YES/NO" value)
With this setup you can break the chain of jobs by setting all the scheduled (administrative) jobs to "ACTIVE=NO"
b) Schedule the first job to be run at the desired time with ACTIVE=YES
Now all you have to do is to check (before the backup starts) if any maintenance job is still running - if yes, you set all the other schedules to ACTIVE=NO and cancel the single running process (should be scriptable easily).
After backup ends, set all the jobs to active again (their startup time and date are in the past so the do not start except the first one)
It is just an idea, but should work Let us know
By barouch in forum ScriptingReplies: 20Last Post: 01-28-2013, 05:16 PM
By blackcat39100 in forum ScriptingReplies: 8Last Post: 02-12-2009, 09:52 AM
By jqgoode in forum ScriptingReplies: 10Last Post: 09-05-2007, 08:33 PM
By nbritton in forum ScriptingReplies: 3Last Post: 11-02-2006, 01:07 PM
By bgc in forum ScriptingReplies: 2Last Post: 07-27-2006, 10:50 AM