Windows 2008 R2 schedule tasks command line

Useful for Server Core or scripting


SCHTASKS /Run [/S system [/U username [/P [password]]]] [/I] /TN taskname

Description:
    Runs a scheduled task on demand.

Parameter List:
    /S     system        Specifies the remote system to connect to.

    /U     username      Specifies the user context under
                         which the schtasks.exe should execute.

    /P     [password]    Specifies the password for the given
                         user context. Prompts for input if omitted.

    /I                   Runs the task immediately by ignoring any constraint.

    /TN    taskname      Identifies the scheduled task to run now.

    /?                   Displays this help message.

Examples:
    SCHTASKS /Run /?
    SCHTASKS /Run /TN "Start Backup"
    SCHTASKS /Run /S system /U user /P password /I /TN "Backup and Restore"

Comments