Compartilhar via


Run a Task on Demand

Applies To: Windows Server 2008, Windows Vista

You can run a task before or after it is scheduled to run. This allows you to start the task's actions on demand. You must have the correct permissions to run certain tasks. For more information, see Task Security Context. You can only run a task on demand if the task is enabled and the Allow task to be run on demand setting is selected for the task. For information about enabling a task, see Enable a Task to Run. For more information about task settings, see Task Settings.

To run a task on demand by using the Windows interface

  1. If Task Scheduler is not open, start Task Scheduler. For more information, see Start Task Scheduler.

  2. Find and click the task folder in the console tree that contains the task you want to run.

  3. In the console window, click the task that you want to run.

  4. In the Actions pane, click Run.

To run a task on demand by using a command line

  1. Open a command prompt. To open a command prompt, click Start, click All Programs, click Accessories, and then click Command Prompt.

  2. Type:

    schtasks /Run [/S <system> [/U <username> [/P [<password>]]]] /TN <taskname>
    

To view the help for this command, type:

schtasks /Run /?

Additional references

End a Running Task

Display all Running Tasks

Command-line syntax notation