Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security, Veeam & DevOps

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form

How to create, edit and delete a scheduled task via the Command Prompt

Posted on 31/03/202016/09/2026 Christian By Christian 4 Comments on How to create, edit and delete a scheduled task via the Command Prompt
  1. Home
  2. Windows Server
  3. How to create, edit and delete a scheduled task via the Command Prompt
create scheduled task

The Task Scheduler enables you to automatically perform routine tasks on a chosen computer. Task Scheduler does this by monitoring whatever criteria you choose (referred to as triggers) and then executing the tasks when those criteria are met. Kind refer to these related guides: How to create advanced scheduled task on Windows Server with Windows Task Scheduler, how to create a Scheduled task with Windows Admin Center, how to setup Windows server backup and create backup jobs, and how to create Windows Task Scheduler via the command prompt. 

You can use the Task Scheduler to execute tasks such as starting an application, sending an email message, or showing a message box. Tasks can be scheduled to execute in response to these events, or triggers.

Task Scheduler allows you to automate many tasks on Windows 10, 11 a,d on Windows Servers. The Task Scheduler was formerly refferd to as “Scheduled Tasks”. Here is a link to all articles relating to task scheduler.

How to use the Command Prompt

Windows Server and Windows 10, by default, have the Task Scheduler, and this enables you to run tasks automatically at a scheduled time. Task schedulers can be used to launch applications, word documents and execute scripts at a scheduled time.

The command prompt can be used to create, edit and delete a scheduled task and below are some flags associated with the executable SCHTASKS.EXE file.

Task Scheduler creates options via Command-line: Here are the options allowing to create and customize a scheduled task via the command-line.

/CREATESpecifies that you want to create a new an automated routine.
/SCDefines the schedule for the task. Options available, include MINUTE, HOURLY, DAILY, WEEKLY, MONTHLY, ONCE, ONSTART, ONLOGON, ONIDLE, and ONEVENT.
/Dspecifies the day of the week to execute the task. Options available, include MON, TUE, WED, THU, FRI, SAT, and SUN. If you’re using the MONTHLY option, then you can use 1 – 31 for the days of the month. Also, there’s the wildcard “*” that specifies all day.
/TNSpecifies the task name and location. The “MyTasks\Notepad task” uses the “Notepad task” as the name and stores the task in the “MyTasks” folder. If the folder isn’t available, it’ll be created automatically.
/TRSpecifies the location and the name of the task that you want to run. You can select an app or a custom script.
/STDefines the time to run the task (in 24 hours format).
/QUERYDisplays all the system tasks.
/RUSpecifies the task to run under a specific user account.

Create Scheduled Task

Below are the space to create a scheduled task via the command prompt. Launch the Command Prompt with the Administrator’s right. Below is the command and please modify it to your desired need

Daily: Type the following command to create a daily task

SCHTASKS /CREATE /SC DAILY /TN "FOLDERPATH\TASKNAME" /TR "C:\SOURCE\FOLDER\APP-OR-SCRIPT" /ST HH:MM
edit scheduled task

Weekly: Type the following command to create a weekly task

SCHTASKS /CREATE /SC WEEKLY /D SUN /TN "FOLDERPATH\TASKNAME" /TR "C:\SOURCE\FOLDER\APP-OR-SCRIPT" /ST HH:MM

Monthly: Type the following command to create a monthly task.

SCHTASKS /CREATE /SC MONTHLY /D 15 /TN "FOLDERPATH\TASKNAME" /TR "C:\SOURCE\FOLDER\APP-OR-SCRIPT" /ST HH:MM


To modify (edit) the Task Scheduler option via the Command: In this guide, we are using the following options to create a scheduled task:

/CHANGESpecifies that you want to edit an existing task
/TNSpecifies the name and location of the task that you want to modify
/STDefines the new time to run the automated routine.

These are just some of the available options. Nonetheless, You can learn more about the options to change a scheduled task by running the SCHTASKS /CHANGE /? command.

Command Prompt

Moreover, To delete a scheduled task: Here are some commands associated with the command prompt to delete a scheduled task.

/DELETESpecifies that you want to delete an existing task.
/TNSpecifies the name and location of the task that you want to delete
Command Prompt window showing the deletion of a scheduled task named 'ChomeTask\Chromeschedule', with confirmation and success message.

Furthermore, This was tested on Windows 10 and Windows Server 2019. However, If you need any further assistance, please let me know.

Thank you for reading this post. Kindly share it with others.

  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Facebook (Opens in new window) Facebook
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Telegram (Opens in new window) Telegram
  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
Windows Server Tags:TaskScheduler

Post navigation

Previous Post: How to disable power plan in Windows via GPO and Windows Settings
Next Post: NT LAN Manager: How to prevent NTLM credentials from being sent to remote servers

Related Posts

  • windows pe screenshot1 rcm1200x0
    Workaround and Permanent fix for this snap-in performed a non-valid operation and has been unloaded: To continue using this snap-in restart MMC or try loading the snap-in again Windows Server
  • Hyper V Virtual Switch Copy
    How to Create VDI Collections on Windows Server 2022 Network | Monitoring
  • Devolusion RDM update e1784558877194
    Action required: Update Devolutions Remote Desktop Manager Before July 21 Linux
  • hero activedirectory
    How to find disabled Active Directory User accounts Windows Server
  • hero windowsadmincenter
    How to schedule and run update via Windows Admin Center Windows Server
  • iscsi
    Install and configure iSCSI Target Server and iSCSI Initiator on a Windows Server Windows Server

More Related Articles

dfggg SimpleSAMLphp Setup on Windows Server [Part 1] Windows Server
Screenshot 2021 04 08 at 01.11.20 How to export a certificate in PFX format in Windows Windows Server
https specials images.forbesimg.com imageserve 4c098735a05b4251a85e8505c91f1837 0x0 Fix insufficient access rights to perform this operation when trying to enable Active Directory Recycle Bin Windows Server
cv Add languages to Windows images using DISM and PowerShell Windows Server
screenshot 2020 02 13 at 22.47.41 Active Directory Flexible Single-Master Operations Roles [FSMO] Windows Server
How to install and configure a Standalone DNS Server How to Install and Configure a Standalone DNS Server Windows Server

Comments (4) on “How to create, edit and delete a scheduled task via the Command Prompt”

  1. Avatar photo Mark Ayres says:
    13/10/2021 at 3:36 PM

    Great work Christian,

    Concise and to the point. I was able to get exactly what I needed quickly

    Thanks,
    -Mark

    Log in to Reply
    1. chris Christian says:
      15/10/2021 at 10:05 PM

      Thank you very much for the kind words

      Log in to Reply
  2. Avatar photo Krupa says:
    08/03/2022 at 12:41 PM

    I would like to know, how I can give Start in(optional) path in Task scheduler using command promt?

    Log in to Reply
  3. Avatar photo Don says:
    20/09/2023 at 10:05 PM

    I am looking to create a schedule task that would logout current user if they are ldle for more then 60 minutes

    Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

vexpert-badge-stars-5

Virtual Background

VEEAMLEGEND

Categories

Top 30 Sysadmin blog

veeaam100

Veeam Vanguard

  • TPM
    Clear TPM: How to enable or disable TPM in Windows Windows
  • maxresdefault
    Install and manage IP Address Management on Windows Server Windows
  • Backup for Microsoft 365 and Azure
    Veeam Backup Deployment options for Microsoft 365 Data AWS/Azure/OpenShift
  • update powershell in Windows
    Upgrade PowerShell Core Windows or Mac and Linux System Windows
  • xxxxxx
    How to move the Taskbar to a second screen in Windows Windows
  • RDS Architecture
    The following servers in this deployment are not part of the deployment Pool: Create an RDS Session Host and Collection Windows Server
  • Dockerxx1
    How to install and uninstall Docker Desktop on Windows 10 and Windows Server Containers
  • Banner
    How to enable or disable Firefox Network Captive Portal Service Network | Monitoring

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,746 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Contact
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon
  • Bsky

Tags

Active Directory Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2026 TechDirectArchive

Loading Comments...

You must be logged in to post a comment.