How to Schedule Batch Files to Run Automatically in Windows 10

Jan. 5, 2021



Batch files are typically used toautomate repetitive tasks in Windows computers, and the ability to schedule those tasks to run at designated times make it a powerful productivity tool. Today, we will learn how to schedule batch files inWindows 10using the built-in Task Scheduler utility. Even if you’re not an advanced user, the simple instructions will help you create batch files to run commands on a schedule to help to automate tedious tasks on your PC.

Schedule Batch Files to Run Automatically in Windows 10

Schedule Batch Files to Run Automatically in Windows 10

This tutorial will show you not only how to schedule batch files to run automatically in Windows 10, but also tell you about what it is and how it helps advanced users automate tasks in Windows computers. We will also teach you how to make a batch file on Windows 10. So without further ado, let’s look at what a batch file is and how to use them to execute commands on a schedule in Windows using Task Scheduler.

BAT files are supported by DOS, OS/2 and Windows, but not all extensions are supported by all platforms. While .bat is used in DOS and Windows, other platforms like Windows NT and OS/2 also added the .cmd extension. Batch files for other environments may have other extensions.

You don’t needsource code editorsor fancy IDEs to write BAT files in Windows. All you need is the good old Notepad, because a barebonestext editoris all you need create a batch file in Windows.

To start off, let’s write a simple batch file that will open multiple programs simultaneously at startup every time. I use Firefox every day for my surfing needs and Outlook to check my mails. So we’ll create a batch file to call the executable for both those programs that we want to open. For that, do the following:

This will tell your computer not to give you any messages or popups while executing the  commands in the batch file.

start “Firefox” “C:\Program Files\Mozilla Firefox\Firefox.exe”start “Outlook” “C:\Program Files\Microsoft Office\root\Office16\Outlook.exe”

There are three basic elements to the above commands. The first is the ‘start’ command that is used in batch files to open programs.

Next is the name of the application – Firefox, Outlook, etc. It is for your convenience only, so you can use any name you want without affecting the end result.

Finally, there’s the app installation path. It will be determined by where the target program is installed. In my case, both are installed at“C:\Program Files\”. For 32-bit applications, the default location would be“C:\Program Files (x86)\”.

You can create any number of files to perform tasks on your PC. Many batch files are also available for download online, but make sure you download them from reliable sources to avoidmalware threats.

Note:You can also opt for more granular controls over the scheduling time, triggers and conditions by choosing ‘Create Task’ instead of ‘Create BasicTask‘.

That’s it! You now know how to create and schedule batch files to automate simple but repetitive tasks in Windows.

As mentioned already, you can play around with other options within Task Scheduler to automate various tasks in Windows. For example, check out our article on schedulingautomatic shutdown of Windows 10computers by clicking on the link. Once you start getting the hang of it, you will see that the possibilities are endless. So which tedious, repetitive task do you want to automate using batch files? Let us know in the comments down below.

Passionate techie. Professional tech writer. Proud geek.