Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2009
    Thanked 0 Times in 0 Posts

    Default 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

  2. #2
    Moderator Harry_Redl's Avatar
    Join Date
    Dec 2003
    Czech Republic
    Thanked 100 Times in 99 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


Similar Threads

  1. Script to cancel all process
    By barouch in forum Scripting
    Replies: 20
    Last Post: 01-28-2013, 06:16 PM
  2. Report execution in a admin script.
    By blackcat39100 in forum Scripting
    Replies: 8
    Last Post: 02-12-2009, 10:52 AM
  3. Any script to cancel current sessions?
    By jqgoode in forum Scripting
    Replies: 10
    Last Post: 09-05-2007, 09:33 PM
  4. Admin DRM script
    By nbritton in forum Scripting
    Replies: 3
    Last Post: 11-02-2006, 02:07 PM
  5. Help with Cancel Session Script
    By bgc in forum Scripting
    Replies: 2
    Last Post: 07-27-2006, 11:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts