Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

If I schedule a task using windows task scheduler for, say, 2 minutes from now, and for some reason the computer is shut down 1 minute from now, and turned on 3 minutes from now, will the task that was scheduled still run?

If not, what can I do to mimic this functionality?

I'm writing a Java application that needs to execute a variety of system commands and I'd prefer the operating system actually manage the task execution phase. All I really need to have happen is for the task to execute as soon as possible by the operating system.

share|improve this question

1 Answer 1

No, it won't execute. The Task Scheduler in Vista and 7 can be configured to run missed instances, but XP's can't.

However, all 3 can be set to wake the computer if it's asleep or hibernating.

enter image description here

share|improve this answer
    
+1 You beat me to it, but I am going to add a screenshot. –  KCotreau Jul 20 '11 at 0:19
1  
I'm using schtasks to set up the task (programmatically), do you know the flag for "Run task as soon as possible"? –  Mark Elliot Jul 20 '11 at 0:21
    
Just got here from a search on "windows 7 task scheduler missed task". Figured I should add a tidbit I found out in my search: the "Run task as soon as possible after scheduled start is missed" doesn't run the missed task immediately. There's a 10-minute delay. So if it was scheduled at midnight and the PC was off, it won't run until 10 minutes after you turn it back on. (Zombie comment, but might be useful.) –  RobertB Apr 6 at 23:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.