Task Scheduler Changes in Windows Vista and Windows Server 2008 – Part Two

Task Scheduler Changes in Windows Vista and Windows Server 2008 – Part Two

  • Comments 14
  • Likes

Hey there!  Blake here with my long overdue post (I know, I’m sorry!) on the new Task Scheduler for Windows Vista and Windows Server 2008.  In Part One, we discussed the new User Interface, Triggers and Task Conditions.  Today we’re going to discuss Flexible Actions and Triggers, Security and Reliability.  So, let’s get started …

For flexible actions and triggers, prior to Windows Vista and Windows Server 2008, a task was launched based on a single trigger and that job could only include one action.  One of the most common scenarios we encounter is a task that launches a script that launches another script and so on – and somewhere inside all of these nested and linked scripts, a failure occurs.  With the new changes, this scenario is mitigated.  Multiple triggers can now be attached to any given task.  For example, a given error condition might be indicated only if three different events occur.  An administrator can easily define a task that will launch only if all three of these events occur.

Tasks may be configured to require multiple triggers, however a single task can be also used to launch multiple actions.  Synchronized operations are now possible, through either multiple actions that run sequentially in a single task or by chaining tasks together using events fired by a previous task to launch the next task.   This synchronization enables scenarios like running a backup job and when it completes, sending out an email to the administrators and display a message on the console.  To achieve this, you configure a new Action for the job, and sort it accordingly.  When each action has completed, the next one will run.

Security in the new Task Scheduler has also been greatly improved.  Task Scheduler now supports a security isolation model in which each set of tasks running in a specific security context starts in a separate session.  Tasks executed for different users are launched in separate window sessions, in complete isolation from one other and from tasks running in the machine (system) context.  Passwords are stored (when needed) in the Credentials Manager (CredMan) service using encryption interfaces.  Using CredMan prevents malware from retrieving the stored password, tightening security further.  Administrators can configure security services such as Service for Users (S4U) and CredMan, depending on whether the task requires remote or local resources.  S4U relieves the need to store passwords locally on the computer, and CredMan, though it requires that passwords be updated once per computer, automatically updates scheduled tasks configured to run for the specific user with the new password.

And now we come to Reliability.  The new Task Scheduler now includes an option to retry tasks in case of failure, giving you the flexibility to specify the number of retries and the intervals of time between tries.  Task Scheduler makes sure that tasks run even if a machine is in a sleep state when the task is scheduled.  This new functionality, which allows Task Scheduler to wake the machine from standby or hibernate to run a task, lets administrators take advantage of the enhanced power-saving modes in Windows Vista and Windows Server 2008 without having to worry whether critical tasks will run on time.  In addition to being able to wake the computer to run a task, administrators can now specify an option to run a task when the computer becomes available.  When this option is selected, Task Scheduler will run the task as soon as the computer is powered on if the scheduled task execution was missed.  For example, if a virus scan was scheduled to run at 3 a.m., but the system was not powered on, Task Scheduler will execute the virus scan the next time the machine is turned on.  Windows Vista and Windows Server 2008 give you these options for making sure critical tasks run as quickly as possible.

And with that, we have completed our blog posts on the new changes with Task Scheduler in Windows Vista and Windows Server 2008.  Take Care!

- Blake Morrison

Share this post :
Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • two simple questions:

    a) how the scheduler determines unsuccesfull task completion? when the errorlevel returned is not 0?

    b) is it possible to configure some more complex mechanism for error completion? such as custom script parser or something?

  • Better perf - OK that's good but how about addressing some obvious usability issues like making it easy to copy a scheduled task.  Having to export and import to copy a task is not obvious to some folks.

  • Task Scheduler 2.0 is a killer feature of Vista. I would love to something like Automator (OS X) which builds upon Task Scheduler in Windows 7.

  • Maybe someone can address in part 3 that now when a task runs it loads a special profile located in %systemroot%\system32\  something and that the profile is different than the user account on which the scheduled tasks runs.

    Except when that user is currently logged on, than the profile of that user is used. This resulted for me in some weird situations where as a command line schedule to do something with excel worked perfectly as the user was logged on and failed on weird errors when it runned as a taks. But started as a task while the user was logged on runned ok aswell.

    Is there some reason to why this has been done? In windows 2003 it does not work that way.

  • McAfee won't run the virus scan when my computer is in the sleep mode.  It comes up with "task image is corrupt or has been tampered with.  How can I correct this?

  • 2 A. Person: confermed. CMD batches not start as task, it works only if user logged in.

    Two week of googling for that problem brings nothing... Guys (from MS) what you have made with simple but working Task Scheduler from Windows 2003? Get it back!!!

  • Having the same issue.  Task is setup to run a batch file but will only do so if logged in.  Can't seem to find anyone who resolved.  Ideas anyone?

  • In properties on section General is "Run wheter user is logged on or not" marked?

  • hello,

    I read in internet that Task Scheduler version in Windows vista /W2k8 is Task Scheduler 2.0. I have a machine with W2k8 installed. There i checked the Task Scheduler version in about dialog . It says 1.0. Can anybody tell me why is this so?

    Where can i see the 2.0 version of task scheduler ?

  • I've googled for hours.

    How do you send an email if a task fails or is overdue?

  • Could explain how actions work.  If one fails does the next one still run. How do set a sequentail task to run or not run.

  • Task scheduler will send the email I told it to, but does not attach the file I specified.  I clicked browse on the file attachment option and chose the file so it's not like I pointed it to a location where the file was not at.  Any ideas what I'm doing wrong?  Thanks in advance!

  • You can run a batch job if you configure for W2003 in the general tab.  The problem I am having is that at some point in time it changes back to W2008 and will not run.  How do you keep the setting for W2003?

  • to send an email how do you enter the gmail user name and password?   there is only a box to enter the SMTP server