fbpx Manage Scheduled Tasks on a Computer | Windows PowerShell, Windows Server | HostingUltraso.com
24/7/365 Support

Manage Scheduled Tasks on a Computer

Problem

You want to schedule a task on a computer.

Solution

To manage scheduled tasks, use the schtasks.exe application. To view the list of scheduled tasks:

PS >schtasks

TaskName Next Run Time Status ==================================== ======================== ============= Defrag C 03:00:00, 5/21/2007 User_Feed_Synchronization{CA4D6D9C 18:34:00, 5/20/2007 User_Feed_Synchronization{CA4D6D9C 18:34:00, 5/20/2007

To schedule a task to defragment C: every day at 3:00 a.m.:

schtasks /create /tn "Defrag C" /sc DAILY ` /st 03:00:00 /tr "defrag c:" /ru Administrator

To remove a scheduled task by name:

schtasks /delete /tn "Defrag C"

Discussion

The example in the solution tells the system to defragment C: every day at 3:00 a.m.. It runs this command under the Administrator account, since the defrag.exe command requires administrative privileges. In addition to scheduling tasks on the local computer, the schtasks.exe application also allows you to schedule tasks on remote computers.

On Windows Vista, the schtasks.exe application has been enhanced to support event triggers, conditions, and additional settings.

For more information about the schtasks.exe application, type schtasks /?.

Help Category:

Get Windows Dedicated Server

Only reading will not help you, you have to practice it! So get it now.

Processor RAM Storage Server Detail
Intel Atom C2350 1.7 GHz 2c/2t 4 GB DDR3 1× 1 TB (HDD SATA) Configure Server
Intel Atom C2350 1.7 GHz 2c/2t 4 GB DDR3 1× 128 GB (SSD SATA) Configure Server
Intel Atom C2750 2.4 GHz 8c/8t 8 GB DDR3 1× 1 TB (HDD SATA) Configure Server
Intel Xeon E3-1230 v2 3.3 GHz 4c/8t 16 GB DDR3 1× 256 GB (SSD SATA) Configure Server
Intel Atom C2350 1.7 GHz 2c/2t 4 GB DDR3 1× 250 GB (SSD SATA) Configure Server

What Our Clients Say