Ă—
Community Blog How to Create a Scheduled Task on Windows

How to Create a Scheduled Task on Windows

Windows, Task Scheduler, Automation, Tutorials, Computing

By Alain Francois

A scheduled task is a process that helps you to complete an action at a specified time that suits you, depending on your need. Sometimes, you need some actions to run automatically at a specific time:

  1. It will take too long for you to wait for the task to complete.
  2. You cannot perform the task in person.

With a scheduled task, you can do something else, and the process will run at the scheduled time if the computer is running. Windows systems possess a native application to perform such operations called task scheduler. This article will explain how to schedule a task in Windows step-by-step.

Understanding Task Scheduler

The Task Scheduler allows you to perform routine tasks on a chosen computer automatically. You can use the Task Scheduler to execute tasks, such as starting an application, shutting down the computer, etc. Tasks can be scheduled to execute in response to these events or triggers. You can schedule a task:

  • When a specific system event occurs
  • At a specific time (daily, weekly, monthly, and monthly day-of-week schedule)
  • When the computer enters an idle state
  • When the system is booted
  • When a user logs on

It is also important to know what can cause the program to run:

  • The Time-Based Trigger: This is for tasks that start at a certain time or tasks that start periodically, depending on your schedule.
  • The Event-Based Trigger: This is for actions that start at a specific system event.

Running Task Scheduler

To run the task scheduler, open the search box and enter _"task scheduler"_:

1

Then, go to "Create a basic task" on the right panel:

2

Add the name of the task and the description of the task if needed. In our case, we will simulate stopping the computer at a specific time automatically every day:

3

Now, you need to configure the trigger (when the task should start.) In our case, we need a weekly task:

4

Now, we will specify which days of the week the task should run and the repeat frequency:

5

Now, you need to indicate the action that the task will perform at the time scheduled time. The task scheduler offers many actions, but we will only choose the one referring to _Start a program_.

6

Since we would like to shut the computer down, we need to indicate which command should run the action needed. The Windows command to shut down the computer is shutdown. This command comes with many parameters, but the one that interests us will help stop the computer, which is -s. We can stop the computer immediately or after a few seconds (-t 15), so the user will have some time to save their work. You can also show a message before shutting down. The complete command is listed below:

shutdown -s -t 10 -c "Shutting Down" (separate it by command and arguments)

7

Now, you can see a summary of the configuration:

8

Now, you can finish. If you open the properties of the task, you will see the general summary. Then, go to the bottom of the window and choose Configure for Windows 10 (our current system.)

9

Click ok

Testing the Configuration

If you want to test the configuration, you can wait until the scheduled time in the task scheduler or create/edit the task with a new time following your current time. (For example, if your clock currently reads 11:00, you can set the task scheduler to begin at 11:05.)

Normally, you will receive a message like this before shutting down:

10

As configured, you have 10 seconds to save your work. Then, your computer will shut down.

11

Conclusion

We have learned how to schedule a task that will be executed at a specific time. You can use another configuration with other trigger options the Windows systems offer. This is interesting if you are running a task that will take you a lot of time to wait for. If you are sure that everything will be finished by a specifc time, you can also schedule a shutdown after the task you need is completed.

0 1 0
Share on

Alibaba Cloud Community

1,011 posts | 247 followers

You may also like

Comments

Alibaba Cloud Community

1,011 posts | 247 followers

Related Products