Task Scheduler recognizes only first trigger


  1. Posts : 2
    Windows 7 Home Premium (32 bit)
       #1

    Task Scheduler recognizes only first trigger


    Hi,

    the problem is if I create a new task for the task scheduler which is having multiple triggers, only the first entered trigger is recogized and used.

    E.g., I have two weekly triggers to execute a program. The first selects Mon, Tue, Wed, Thu, and Fri to run the program. The second selects the weekend to run the program, i.e. Sat, Sun.

    --> Now, the program starts only on Mon to Fri. The Sat/Sun trigger is neglected and the program doesn't start on the weekend.

    If I delete the first Mon-Fri trigger, suddenly the weekend trigger is recognized.

    If I then add the Mon-Fri trigger again (now as second trigger), it remains unoticed, i.e., only the weekend trigger remains used.

    In all cases I made sure the triggers were set "active".

    Any ideas how to solve that?

    Thx
      My Computer


  2. Posts : 17,796
    Windows 10, Home Clean Install
       #2

    cerrick said:
    Hi,

    the problem is if I create a new task for the task scheduler which is having multiple triggers, only the first entered trigger is recogized and used.

    E.g., I have two weekly triggers to execute a program. The first selects Mon, Tue, Wed, Thu, and Fri to run the program. The second selects the weekend to run the program, i.e. Sat, Sun.

    --> Now, the program starts only on Mon to Fri. The Sat/Sun trigger is neglected and the program doesn't start on the weekend.

    If I delete the first Mon-Fri trigger, suddenly the weekend trigger is recognized.

    If I then add the Mon-Fri trigger again (now as second trigger), it remains unoticed, i.e., only the weekend trigger remains used.

    In all cases I made sure the triggers were set "active".

    Any ideas how to solve that?

    Thx
    If your new task, is something like system restore, which was already on task schdduler, it will run accordcing to schedule, if it has not run within a specificed period of time. System restore will run on schedule if it has not run within the last 24 hours.
      My Computer


  3. Posts : 2
    Windows 7 Home Premium (32 bit)
    Thread Starter
       #3

    richc46 said:
    If your new task, is something like system restore, which was already on task schdduler, it will run accordcing to schedule, if it has not run within a specificed period of time. System restore will run on schedule if it has not run within the last 24 hours.
    Thanks for your reply. I try to automatically shutdown my PC (shutdown -s -f -t 600). This should happen on different times wrt whether it's Mon-Fri or Sat-Sun; hence multiple triggers.

    Well, a workaround is to set up multiple tasks, each having one trigger.

    I wonder, does anyone else have the same problem described in the original post?
      My Computer


  4. Posts : 2
    Windows 7 Enterprise 32-bit
       #4

    I have the same issue. I think your 2 triggers are in conflict in a sense. The first one allows weekdays but not weekends. Since the first trigger has not expired, I think that second trigger is ignored because it wants to run on weekends which is not allowed by the first trigger. So your solution of creating separate tasks is the best solution I can think of.
      My Computer


  5. Posts : 1,454
    Windows 7 ultimate x64
       #5

    What are your trigger and action conditions ???
      My Computer


  6. Posts : 2
    Windows 7 Enterprise 32-bit
       #6

    Right. Let's consider a task with 2 triggers cooked up as a demonstration.
    One trigger is weekly Monday through Friday.
    The other is monthly on the evening of the last Sunday of each month.
    Right now, it is the morning of the last Sunday of the month.
    The action is to run a meaningless .BAT file.

    Case 1: The weekly trigger is coded first, the monthly one second.
    Result: The task is scheduled for Monday but I expected it Sunday. The monthly (second) trigger is ignored.

    Case 2: Same order for triggers as Case 1, but disable the weekly trigger.
    Result: The task is scheduled for Sunday as expected.

    Case3: The monthly trigger is coded first, the weekly one second
    Result: The task is scheduled for Sunday as expected.

    Case4: Change the monthly trigger to run the first Sunday rather than the last. Same trigger order as case 3.
    Result: The task is scheduled for the first Sunday but I was expecting Monday. The weekly (second) trigger is ignored.

    I have done similar testing with combinations of (a) 2 weekly triggers, (b) a one-time and a weekly trigger, (c) 2 one-time triggers. For each combination, I see similar results. Note that the case of the one-time triggers works if the triggers are entered in chronological scheduled-time order .

    I, therefore, conclude that where 2 triggers overlap in enabled period, the first takes precedence and the second is ignored
      My Computer


  7. Posts : 6,330
    Multi-Boot W7_Pro_x64 W8.1_Pro_x64 W10_Pro_x64 +Linux_VMs +Chromium_VM
       #7

    @Jerkasaurus
    +1 - Very nice explanation and testing!

    To me, it seems the easiest solution is to create a new scheduled task for each Scheduled "Time Based" trigger.

    I'll add this.
    I've set up scheduled tasks with multiple triggers that are not "time based" (on a schedule) and the multiple triggers work in a single task.

    i.e.
    I want a task to run any time a PC "starts up".
    The PC may statup from a Wakeup, Hibernate (Resume), or Power On start up.

    I set up a trigger for a Wakeup/Hibernate (Event) startup.
    I had to set up another trigger for a Power On start up.
    Each of these triggers work in a single scheduled task.

    Thanks again for the explanation, and hopefully I'll remember this !
      My Computer


  8. Posts : 1
    Windows 7 Enterprise 64bit
       #8

    i'll update this old post as it's the first i found with my problem.
    turns out it is only a display problem (i didn't test this) and microsoft has a hotfix for this.
    http://support.microsoft.com/kb/2495489

    i have this problem scheduling monthly reboots and have a different schedule for the holiday months (Nov & Dec). these tasks kick off System Center Orchestrator jobs and we have several dozen to kick off. reallllly don't want to create multiple tasks for each runbook kickoff.
    Last edited by balkcoma; 24 Oct 2013 at 08:14. Reason: corrected url
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 13:27.
Find Us