Kaseya Community

Problems with Excluding Time Range

  • I am trying to ZIP then copy a 2 GB file from 1 machine to another on the same network. No problem there. I am using the procedure zip and the procedure COPY and it works fine.


    My problem is this.

    I  schedule this to occur at 4AM and have chosen to choose uncheck "skip if offline" based on the fact that  many times After Zipping the file the Script Will fail with "Agent was Offline" even though I have no reason to believe it was actually offline.

    So I turned off Skip if offline and told it not to run the script between 7am and 8pm. The problem is that once the script start it ignores the time restrictions. Meaning if it starts at 4AM and the computer shuts down (power outage whatever) when it is turned back on it starts to run again even if its between 7am and 8pm.


    Essentially. Computer starts zipping script COMPUTER GOES OFFLINE at 5AM. Comes online at 9AM and the script continues. Due to this being Peak usage for my clients I want the script to die at this time. If it can't complete by 7am I just want it Canceled. I don't want a 2GB file transferring while they are working.


    Any ideas? I would just use Skip if Offline but I've been getting lots of "Script Failed since agent was offline" even though I can't figure out why its offline. Thanks!

  • Sounds to me like you may need to schedule another script which will watch to see if the machine is rebooted. If it is then you'll want to have the script kill the "xcopy.exe" process on that machie (if it's running).

  • I'd like to find a way that says IF Time = stop script. Or if Someone logs in cancel script. May toy with that.  

  • I am finding a similar issue with the Exclusion time..it seems as if its just not working at all.

    For instance, I am testing a script that performs maintenance...so I set it to check for user response...

    I then schedule it for 6:30pm....do not select skip if offline, and i set an exclusion for 6:35pm-8pm and power off the machine at 6:25pm

    Logic tells you the script will normally run when the machine comes online, but only if the time is outside that 6:30-8pm timeframe.

    However, the scripts totally ignore the time restriction and as soon as the PC boots up at 6:40pm, i get the popup.

    Whats the point of exclusion times if they don't actually work?

    [edited by: Mark.Hodges at 5:47 PM (GMT -7) on 3-25-2012] added time
  • I agree with Mark. Exclusions apparently only work on Starting of a script but if the script hasn't finished by those times it will continue.

    At this point I'd be perfectly happy with a procedure step that says "IF not finished by TIME X then STOP script" or just a STOP SCRIPT Procedure

  • I have one similar issue, I schedule one procedure to run each 30 minutes all day long, excluding 6pm - 8am (the procedure technically only run in business hours). But this procedure simply ignore this time restriction.

    I doing correct or did something wrong?

    Thanks in advance.

  • I am going to open a ticket on this.  The time exclusions are not working at all.  I created a simple send message procedure.  Scheduled it for every minute for 5 minutes starting at 9:12am  I put in an exclusion on the schedule for 9:13am - 8:-00pm

    I got all the popups....

    Test Time exclusions

    9:16:05 am 17-Jun-12

    Success THEN

    Test Time exclusions

    9:15:03 am 17-Jun-12

    Success THEN

    Test Time exclusions

    9:14:01 am 17-Jun-12

    Success THEN

    Test Time exclusions

    9:12:59 am 17-Jun-12

    Success THEN

    Test Time exclusions

    9:11:58 am 17-Jun-12

    Success THEN

    [edited by: Mark.Hodges at 8:29 AM (GMT -7) on 6-17-2012] adjust timing
  • I raised a ticket years ago re this.

    My issue was when the exclude window spanned 2 days .. i.e. was from  6pm - 7am

    So might be worth retesting and adding to your ticket if it also is still an issue


  • Want a better explaination

    Ticket CS110127: “Time Exclusions not being honored”

    The 'Exclude the following time range' function applies only to the distribution window. If checked, specifies a time range to exclude the scheduling of a task within the distribution window. Specifying a time range outside of the distribution window is ignored by the scheduler. This is by design.  The exclusion window only applies to the distribution windows for the initial scheduling.  After that it is not used in any calculation.

    Admittedly the interface does not convey this properly and there are plans being made at the current time to change this behavior in a future release of Kaseya.