Get the App
SLTechnology News&Howtos  ›  Servers  › 

Windows exports all scheduled task methods

Shulou Source: shulou.com Published: 2022-06-03 02:45:40 09月17日 Update

The command for windows to schedule tasks is: schtasks

SCHTASKS / parameter [arguments]

Description:

Allows administrators to create, delete, query, change, run, and abort plans on local or remote systems

Business.

Parameter list:

/ Create creates a new scheduled task.

/ Delete deletes the scheduled task.

/ Query displays all scheduled tasks.

/ Change changes the scheduled task properties.

/ Run runs scheduled tasks on demand.

/ End aborts the currently running scheduled task.

/ ShowSid displays the security identifier corresponding to the scheduled task name.

/? This help message is displayed.

Examples:

SCHTASKS

SCHTASKS /?

SCHTASKS / Run /?

SCHTASKS / End /?

SCHTASKS / Create /?

SCHTASKS / Delete /?

SCHTASKS / Query /?

SCHTASKS / Change /?

SCHTASKS / ShowSid /?

SCHTASKS / QUERY /?

SCHTASKS / Query [/ S system [/ U username [/ P [password]

[/ FO format | / XML [xml_type]] [/ NH] [/ V]

[/ TN taskname] [/ HRESULT] [/?]

Description:

Allows administrators to display scheduled tasks on local or remote systems.

Parameter list:

/ S system specifies the remote system to connect to.

/ U username specifies the user context to be executed by schtasks.exe.

/ P [password] specifies the given user context password. If omitted, prompt for input.

/ FO format specifies the format for the output. Valid values: TABLE, LIST, CSV.

/ NH specifies that column headers are not displayed in the output.

Valid only for TABLE format.

Only available in TABLE and CSV formats.

/ V displays detailed task output.

/ TN taskname specifies the task path whose information you want to retrieve\ name

Otherwise, information for all tasks will be retrieved.

/ XML [xml_type] displays the task definition in XML format.

If xml_type is ONE, the output is a valid XML file. If xml_type does not exist, the output will be concatenated for all XML tasks.

/ HRESULT handles exit codes for better troubleshooting capabilities

The HRESULT format will be used.

/? This help message is displayed.

Execute under the command line:

Schtasks / query / NH / FO csv / V > schtasks_result.txt

The export result is shown in the figure:

Tags: Task format output valid system run up and down context information parameter name command message user administrator help retrieval management security code Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Apple MariaDB OPPO Reno NVidia