Most people have daily, weekly, or monthly tasks that needed to be done on a regular basis. You can automate such process by using Microsoft’s Task Scheduler. For example, you have a daily report in Excel that links to the Oracle database through ODBC connection. You can schedule the Excel report to be run in the middle of the night when the system resources are least demanded. When you come back to the office the next morning, you just need to review the daily report and send it out. In addition, you can use the Task Scheduler as a reminder what you need to do. If you need to produce a report or to send out an email to remind your co-workers for a report on a monthly basis, you can also schedule it using the Task Scheduler. The report will pop out on the scheduled time or an email will be sent out automatically.
Please follow the below steps to create a task in the Task Scheduler.
Step 1: Click the “Start” button and choose “Control Panel”. Then choose “System and Maintenance” and click the “Schedule Tasks” option under “Administrative Tools”.
Step 2: Click the “Create Basic Task…” option.
Step 3: Make your choices on the next few screens to (1) give a name to the task, (2) set up the frequency or event of occurrence, (3) Time of occurrence, and (4) Task Action. If you need to run an Excel file, you must choose “Start a Program” option under the Task Action. Click the “Browse” button to locate your Excel file. Afterwards, click “Next” and “Finish” to finish setting up the task.
When you no longer need to run a task, you can delete it by opening the Task Scheduler and following the steps in the illustration.
NOTES:
You can write a Visual Basic script to open an excel spreadsheet, run a macro within, and subsequently close the sheet. Please refer to this website for more information (https://www.mrexcel.com/forum/excel-questions/302970-task-scheduler-vbulletin-script-auto-open-excel.html)
You may need a username or password to run a file, especially those with ADO or ODBC connection. You can put in username and password through the security options. Please refer to this website for more information. (https://www.7tutorials.com/advanced-users-task-creation-task-scheduler)