How to Schedule Batch Files to Run Automatically in Windows 10

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.

What is a Batch File?

Batch Files in Windows are script files, typically with a .bat extension, capable of running a series ofcommands in the Command Promptin a specified sequence and according to triggers defined by the user. You can make a batch file to run just about any Command Prompt command, either manually or on a schedule.

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.

Batch files are similar to Job Control Language (JCL), DIGITAL Command Language (DCL) and other systems on mainframe and minicomputer systems. Unix-like operating systems, such as Linux, have a similar way to automate tasks, called shell script, which is designed to be run by the Unix shell.

What Can I Do With Scheduled Batch Files?

As mentioned already, batch files help you automate repetitive tasks in Windows. You can use it to modify system settings, open up specific programs at specific times, launch multiple apps on a schedule,automate system backupsand more. All supported versions of Windows (server and client) have a set ofbuilt-in Win32 console commandsthat you can use to automate tasks by using scripts or scripting tools. You can use either theWindows PowerShell, Windows Commands or Windows Script Host for automation.

What Special Apps Do I Need to Create Batch Files?

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.

How to Make a Batch File in Windows 10?

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.

How to Schedule Batch Files

How to Schedule Batch Files

Now that we’ve been learnt how to create batch files, we will shift our attention to the (relatively) easier part where we set it to run on a schedule. In our case, we will set this file to run at Windows logon every time. To do this, we’ll use the built-in Windows Task Scheduler, which is an utility that lets users specify triggers to launch programs or scripts at pre-defined times or at specified time intervals.

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.

Use Batch Files to Automate Tasks on 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.

Kishalaya Kundu

Passionate techie. Professional tech writer. Proud geek.

Add new comment

Name

Email ID

Δ

01

02

03

04

05