Forum Home
Press F1
 
Thread ID: 118993 2011-06-30 02:41:00 Windows 7 task scheduler malone73 (15106) Press F1
Post ID Timestamp Content User
1213490 2011-06-30 23:39:00 Thanks wainuitech - I've tried it with a .exe (notepad.exe), and other .exe applications, and still have the problem

Yes kahawai chaser, I found that thread yesterday and have created a task using the command line and a .xml file as suggested. It behaves just like the tasks I create manually and doesn't run the task later if the schedule is missed.

Thanks Peter q - I disabled the Total Recorder scheduler and still have the problem. I intend to completely remove Total Recorder later on today when I have a moment.
malone73 (15106)
1213491 2011-07-01 00:28:00 This thread (social.technet.microsoft.com) might offer ideas, of which a task scheduler managed wrapper (taskscheduler.codeplex.com/) is used and from code project. (http:) kahawai chaser (3545)
1213492 2011-07-01 03:38:00 Sounds like theres a fault in the task schedular somewhere.

Just out of interest, after the computer reboots, go into the services, make sure the task scheduler is set to automatic.

Also in the Services / task scheduler, Dependencies Tab, make sure RPC is there.

Just following on from post #10 by Kahawai Chaser -- if you want a "cheats" way to make the files, theres always the free Batchrun (http://www.outertech.com/) ( bottom of page) just tied it here, and it ran the selected file (foobar) after missing the set time + 10 Minutes after being turned off.

BUT yours should also run other exe's as well. :confused:
wainuitech (129)
1213493 2011-07-01 04:20:00 Here's my test.xml


<?xml version="1.0" encoding="UTF-16"?>
-<Task xmlns="schemas.microsoft.com version="1.2"> -<RegistrationInfo> <Date>2011-06-30T22:53:54.3862783</Date> <Author>Godzilla\Lin</Author> </RegistrationInfo> -<Triggers> -<CalendarTrigger> <StartBoundary>2011-06-30T23:13:40</StartBoundary> <Enabled>true</Enabled> -<ScheduleByDay> <DaysInterval>1</DaysInterval> </ScheduleByDay> </CalendarTrigger> </Triggers> -<Principals> -<Principal id="Author"> <UserId>Godzilla\Lin</UserId> <LogonType>InteractiveToken</LogonType> <RunLevel>LeastPrivilege</RunLevel> </Principal> </Principals> -<Settings> <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy> <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries> <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries> <AllowHardTerminate>true</AllowHardTerminate> <StartWhenAvailable>true</StartWhenAvailable> <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable> -<IdleSettings> <StopOnIdleEnd>true</StopOnIdleEnd> <RestartOnIdle>false</RestartOnIdle> </IdleSettings> <AllowStartOnDemand>true</AllowStartOnDemand> <Enabled>true</Enabled> <Hidden>false</Hidden> <RunOnlyIfIdle>false</RunOnlyIfIdle> <WakeToRun>false</WakeToRun> <ExecutionTimeLimit>P3D</ExecutionTimeLimit> <Priority>7</Priority> </Settings> -<Actions Context="Author"> -<Exec> <Command>C:\sched.bat</Command> </Exec> </Actions> </Task>
linw (53)
1213494 2011-07-02 03:21:00 Thanks very much linw for going to the trouble of sending the xml file; it is very interesting. I've yet to analyse it in detail but one significant point is that your trigger is at a specific time EVERY DAY (DaysInterval=1)

<Triggers>
-<CalendarTrigger>
<StartBoundary>2011-06-30T23:13:40</StartBoundary>
<Enabled>true</Enabled> -
<ScheduleByDay>
<DaysInterval>1</DaysInterval>
</ScheduleByDay>
</CalendarTrigger>
</Triggers>

Mine is not set to run every day - it's only set to run once at a specific time

<Triggers>
<TimeTrigger>
<StartBoundary>2011-07-02T07:45:00</StartBoundary>
<Enabled>true</Enabled>
</TimeTrigger>
</Triggers>

When I change my task to be daily like yours, everything works ok. It tells me the task was missed and then runs it about 10mins after the computer is rebooted. But when "one time" is set in the edit trigger settings I have the problem of the missed task not running after reboot.

Obviously, the "one time" is taking precedence over the "Run task as soon as possible after a scheduled task is missed"

And - no - I haven't got the "if the task is not scheduled to run again delete it...." checked.

It seems strange to me that a one time, non repeating, schedule should not be retried if it didn't run for any reason. I wonder whether this is a bug or a Microsoft "by design" feature. What do you think?
malone73 (15106)
1213495 2011-07-02 11:41:00 I guess it could be a design feature. Maybe the reasoning is that a one-off must be fired at the right time in case it is bad news to fire it at the wrong time? Who knows?

Anyway, looks like the difference in behaviour has been sorted.
linw (53)
1213496 2011-07-03 02:14:00 You can do all the above and simpler (by looking at your xml stuff above) by using nnCron Lite from here - http://www.nncron.ru/ decibel (11645)
1213497 2011-07-03 02:27:00 Thanks decibel, I may well try nncron in due course, but I've just started seeing whether I can create a "once only" task by setting up a repetitive task (once every month, say) and then expiring the task before it runs a second time. Then I should get the benefit of the "Run task as soon as possible after a scheduled task is missed" working which it appears not to do when a "once only" task is set up. malone73 (15106)
1213498 2011-07-04 00:12:00 nncron looks interesting, decibel. It has a long list of features but I was a bit disappointed that it doesn't seem to be able to make coffee! linw (53)
1213499 2011-07-05 08:57:00 nncron looks interesting, decibel. It has a long list of features but I was a bit disappointed that it doesn't seem to be able to make coffee!

Agreed, but it can pop up a window at the right time telling you to go and make your own !!
decibel (11645)
1 2 3