How to Schedule Run Batch File in Task Scheduler in Windows

If you have custom batch scripts to run on schedule, follow these steps to schedule batch file in Task Scheduler in Windows.

In Windows, Task Scheduler is one of the most overlooked and even lesser-known applications. However, it is also one of the most useful applications when it comes to Windows automation. You can do so much with just a few clicks.

Though you can do a lot of things directly with the task scheduler, there are also a few things that require you to execute custom scripts. This is especially true for advanced tasks. For example, I wanted to automatically delete files and folders in a given folder after I log into the system. You cannot do that directly with the task scheduler. So, I created a batch script and used the task scheduler to execute that batch file on schedule.

So, if you have task-specific batch scripts that you’d like to execute on schedule then you can do that too. Just follow the below steps to schedule a batch file in Task Scheduler in Windows.

Steps to Schedule Batch File in Task Scheduler

Scheduling a batch file with Task Scheduler is way easier than you think. Just follow the steps shown below and you will be good.

1. First, make sure that you have the batch script ready and stored in a safe place. The location is important because if the file is moved or deleted from that location, the task will not run.

2. Now, open the Start Menu, search for “Task Scheduler” and click on the search result to open the same. Alternatively, you can also use the Run (Win + R) command “taskschd. msc”.

3. After opening the Task Scheduler, click on the “Create Basic Task” option on the rightmost panel.

Schedule-batch-file-create-task

4. In the new task wizard, name the task descriptively and click “Next”.

Schedule-batch-file-name-task

5. In the Trigger page, select how the task should start. In my case, I want the task to start as soon as I log into the system. So, I selected the “When I log on” radio option.

Schedule-batch-file-trigger

6. The Action tab lets you choose what the task should do on the trigger. Since we want to run a batch file on schedule, select the “Start a program” radio option. Click “Next”.

Schedule-batch-file-action

7. We now need to select the batch to run. To do that, click on the “Browse” button. In the window, go to the folder where you’ve stored the batch file, select it and click on the “Open” button. This will add it to the task scheduler. Click “Next”.

Schedule-batch-file-script-location

8. Click the “Finish” button to complete the task creation process.

Schedule-batch-file-click-finish

That is it. From now on, the batch file will run as scheduled.

Run with Admin Rights

If the batch file needs administrative privileges, you need to follow a couple more steps.

First, find the task in the Task Scheduler. Next, right-click on it and select the “Properties” option.

Schedule-batch-file-properties

In the properties window, go to the “General” tab and select the “Run with highest privileges” checkbox and click on the “Ok” button. You will be prompted to enter the admin password. Type the admin password, click on the “Ok” button and you are done.

Schedule-batch-file-admin-rights

I hope that helps. If you are stuck or need some help, comment below and I will try to help as much as possible. If you like this article, do check out how to back up all scheduled tasks in Windows. This is very useful when you have custom scheduled tasks.

3 thoughts on “How to Schedule Run Batch File in Task Scheduler in Windows”

  1. Avatar for Tom

    I can use Task Scheduler to Run a Batch file on the local machine. However, when I schedule a Task to Run a Batch file to copy a file to another machine one the Local Area Network (Drive Z:\Backup) it does not complete the task. I can however, manually run the batch file.
    Example:
    Copy C:\Backup\Datafile.bck Z:\Backup\Datafile.bck

    1. Avatar for Rob Hollis

      Tom I am having a similar issue. My Batch file calls a command line process for another program. When I type in or double click the batch file, everything runs. When I use the scheduler to run it, everything except the piece that calls the other program runs. If you find your answer, I am going to assume it has to do with rights/privs on each machine, please let me know.

  2. Avatar for Machiel Van

    The Task Scheduler does not recognize mapped network drive paths. Use the UNC network path instead.

Leave a Comment

Scroll to Top