How to launch a VB script using the task scheduler at a specific date and time automatically. Watch the video below:
Next to the Windows icon in the text box ‘Type here to search’, start typing ‘task…’ and you’ll be able to view the Desktop App ‘Task Scheduler’. Select to open the ‘Task Scheduler’ window.
In the Task Scheduler Window you can read the ‘Overview of Task Scheduler which guides us on how to use the App.
Click on ‘Action’ in the menu bar and select ‘Create task…’ In the ‘Create Task’ window that pops up, enter a name for the task like ‘Import Data from Word Table’ . In the ‘Description’ area write a description of the task like ‘Data is imported from a Word table into an Excel worksheet’.
In the security options you can select when you wish to run the task and with what privileges.
Under ‘Configure for’ we can select our Operating System like Windows 10 or just leave the entry as it is and finally click on ‘OK’.
Next we click on the ‘Actions’ tab and in the settings under ‘program/script’ we can browse to our script and select it and therefore insert the path automatically in the text-box and then click OK. We can also define some other parameters like ‘Add arguments’ and ‘Start in’ if we wish to do so. Finally click OK.
Next we click on the ‘Triggers’ tab, select ‘New…’ and the ‘New Trigger’ window opens. Here we can select under ‘Begin the task’ an appropriate condition. Under ‘Settings’ we have the option to trigger the action one time, daily, weekly or monthly.
Under the ‘Advanced Settings’ we can select more actions according to our requirements and finally check the ‘Enabled’ box and click OK.
In the conditions tab we can specify the conditions that along with the trigger will determine whether the task will run or not.
In the settings tab we can select additional settings that will effect the behavior of the task.
If we have specified a date and time for the task, the task will execute accordingly and thus our automation will be complete i. e. our task scheduler fires the VB Script which in turn executes our macro.