Schedule Exe or Console app using Windows Task Scheduler
Today in this article we will cover How to Schedule Exe in Windows Task Scheduler
We may find need to schedule an EXE or Console app.
Windows Task Scheduler is a scheduler that helps automate repetitive tasks and reduces the manual effort of running the task in the form of a script or exe.
Today in this article, we will cover below aspects,
There are many advantages of the Tasks scheduler, some of which are listed below,
- Automate the Job/Task
- Schedule tasks at a predefined schedule.
- Schedule the task as per predefined priority.
- Improves turnaround time by a running script at a convenient time. like nightly run etc.
Let’s see in detail how to schedule exe or console applications through the Task scheduler.
Schedule Exe in Windows Task Scheduler – Create Tasks
Open the Tasks Scheduler Windows -> search for Task scheduler or type taskschd.msc using Windows+R.
Click on “Create Task”
Define the below attributes,
- Name – Define Application Name,
- Description – Define the description of the task
- Security options- Please select the appropriate Radio button. We shall select the option “Run whether the user is logged on or not”
- Run with the highest privileges – To run the program with administrator privileges, its recommended to use this option
Configure Tasks in Task Scheduler
Click on the “Trigger” tab and define the configuration
In the next step, please click on the “Trigger” tab and click on “New” to create a new trigger.
You can define the condition of when to trigger the given task for example “On a schedule” PR “On an event” or “on logon” or “on an event” etc.
Configure the Action in Task Scheduler
Click on the “Action” tab and define the configuration
In the next step, please click on the “Action” tab and click on “New” to create a new action.
Please specify the following parameters:
- Action: Start a program
- Program\script: [Exe path including exe name]
- Add arguments (optional): [Add command line argument if any]
- Start in(optional): [exe folder or directory path]
I have kept my Exe at the below path,
Configure the Condition in Task Scheduler
Click on the “Condition” tab and define the configuration
In the next step, please click on the “Condition” tab and select the appropriate options.
These additional conditions let you configure the task based on a specified selection. The task will not run if any conditions specified here are not met..
Do you have any comments or ideas or any better suggestions to share?
Please sound off your comments below.
Happy Coding !!
Please bookmark this page and share it with your friends. Please Subscribe to the blog to receive notifications on freshly published(2024) best practices and guidelines for software design and development.