Task Scheduler is a component of Microsoft Windows. It can provide the ability to schedule the launch of programs or scripts at pre-defined times or after specified time intervals.
Using Task Scheduler, you can trigger a Batch file by creating and managing Tasks on a pre-determined schedule or on demand.
Prerequisite for Trigger the Batch File
Before trigger a Batch file you need to set the system Environment Variable Path as Certify Client path for example “D:\Program Files (x86)\Worksoft\Certify\Client”. Please follow below steps for set the Environment variable.
Prerequisite Steps for Set Environment Variable
- First you need to go to Control Panel > System and Security > System
- After that click on Advanced system settings
Then in Advanced tab click on Environment Variables button.
After that select the Path and press Edit button.
Last you need to input the path of Certify Client folder and press Ok for successfully set the Environment Variable.
Now Batch files are ready to trigger. Below steps are for how to trigger a batch file using Task Scheduler.
Steps for Trigger the Batch File using Task Scheduler
- Open the Task Scheduler Application from your system
Click on Create Task button from the Actions to create new Task.
- In the General tab of Create Task window, give the task name (Mandatory) and select the security options which you need.
If you select “Run only when user is logged on” then Batch and everything will run upfront but if you select “Run whether user is logged on or not” then Batch and everything will execute in Background only.
After General tab you need to click on Triggers tab. In Triggers tab you need press New button for creating a new Trigger.
After clicking on New button New Trigger window will open. In New Trigger window select how you want to trigger the Task like One Time, Daily, Weekly or Monthly then input the start date and time. Also, you can activate the Expire date by click on the check box then you can input the Expire date. After all the inputs done press OK button then you can see the new trigger is successfully created.
In Actions tab click on New button for creating new Action.
In New Action window need to select the Batch File of your Certify process by click on Browse button. After that press Ok button then you can see the New Action created. The selected Batch file will execute at the scheduled time.
After press OK button new Task is created. You can see the new task on Task Schedular main window and the Task Last Run Result should be “The task has not yet run”.
The Batch file will automatically start running in the scheduled time without any human intervention. Also, you can see the Task status in Task Scheduler its Last Run Result should be “The task is currently running”.
At last when the execution over you can check the status of task its Last Run Result should be “The Operation Completed Successfully”. Also, you can login to Certify and check the result.