Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Task Scheduler recognizes only first trigger

06 Dec 2009   #1
cerrick

Windows 7 Home Premium (32 bit)
 
 
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 System SpecsSystem Spec
.

06 Dec 2009   #2
richc46

Microsoft Community Contributor Award Recipient

Windows 7 Home Premium SP1, clean install, upgrade disc
 
 

Quote   Quote: Originally Posted by cerrick View Post
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 System SpecsSystem Spec
07 Dec 2009   #3
cerrick

Windows 7 Home Premium (32 bit)
 
 

Quote   Quote: Originally Posted by richc46 View Post
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 System SpecsSystem Spec
.


28 Dec 2012   #4
Jerkasaurus

Windows 7 Enterprise 32-bit
 
 

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 System SpecsSystem Spec
29 Dec 2012   #5
centaur78

Windows 7 ultimate x64
 
 

What are your trigger and action conditions ???
My System SpecsSystem Spec
30 Dec 2012   #6
Jerkasaurus

Windows 7 Enterprise 32-bit
 
 

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 System SpecsSystem Spec
31 Dec 2012   #7
DavidE

Win 7 Pro x64 SP1, Win 7 Ult x86 SP1
 
 

@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 System SpecsSystem Spec
24 Oct 2013   #8
balkcoma

Windows 7 Enterprise 64bit
 
 

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.
My System SpecsSystem Spec
Reply

 Task Scheduler recognizes only first trigger




Thread Tools





Similar help and support threads
Thread Forum
How to trigger 'task scheduler' on new wifi connection?
Hey everyone, Searched everywhere, and really striking out on how to do this (if it's even possible). I'd like to use Task Scheduler (or some other program) to automatically perform a task when my Android phone connects to my home wifi network (my PC is plugged into this router). Is there a...
Network & Sharing
Task scheduler: trigger on screensaver event possible?
I got task scheduler to run a sync utility when the (on idle) trigger occurs. However, it would trigger while I am watching a full screen movie or video and exit out. Is there anyway to fix this? If not, I noticed my screen saver doesn't get initialize while watching a movie or video in full...
Performance & Maintenance
Task scheduler unable to load task status/active tasks at startup.
My task manager is unable to load task status/active tasks at startup. I get the message: "The selected task "{0}" no longer exists. To see the current tasks, click Refresh." When I refresh I get the same message. I checked and found that under Microsoft the problem was in the defrag...
Performance & Maintenance
Scheduler/trigger events
Hello, I am on Windows 7 enterprise. I use a script to backup my external harddrive to a NAS. (\\NAShome\openshare) (in the script i use "robocopy) I want to use the scheduler to run the script WHEN I POWER ON THE NAS.. This should be possible with trigger-event. I just can't figure out which...
General Discussion
Help with using idle trigger in Win Task Scheduler
OK I know i've bombarded the forums lately with a couple threads all somewhat related. Point of this thread -- how to correctly set the idle trigger in windows task scheduler. There is a MSFT article Task Idle Conditions (Windows) which tries to explain it, but I can't figure it out. I...
Performance & Maintenance
Task Scheduler Trigger @ Program shutdown
Hello, I would like a particular Task to run each time the Firefox application is closed, or, perhaps easier, each time my computer shutdowns. But I have no idea how to set up such Trigger. Have any of you an idea on how I should proceed? Thanks for the help.
Performance & Maintenance

Our Sites

Site Links

About Us

Find 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 08:34.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App