Batch Files and Task Scheduler
If you are creating a batch file, save the Notepad file to any location you like on your computer. When you do this, type .bat as the extension at the end of the file name (e.g., MyBatchFile.bat). At any time you like, you can generate the output simply by double-clicking the batch file. You can also use a tool to schedule the batch file to run.
For example, complete the following steps if using the Windows 10 Task Scheduler utility.
- In the Windows search field, type Task Scheduler and press ENTER.
- Click Action > Create Basic Task.
- In the Create Basic Task Wizard, give the task a name and click Next.
- Using the next couple of pages of the wizard, choose when you wan the batch to run (e.g., daily, starting at 2 a.m.). Click Next until you get to the Action page.
- Click Start a program, and click Next.
- Click Browse. Then find and double-click the batch file you created.
- Click Next.
- Click Finish.