The Windows Task Scheduler allows users to schedule automated tasks that perform actions at a specific time or when a certain event occurs. A user can run, disable, modify, and delete tasks that have been created and stored in the scheduler library. This tool can be used in conjunction with Micromine to automate routine tasks such as running a macro on a daily basis.
A Micromine user can open and automatically run a macro or python script by undertaking the following steps:
1. Search for Task Scheduler in the Windows START menu and open the Task Scheduler application.
2. Navigate to Action | Create Task to open the Create Task dialog where the properties associated with the task are defined.
3. Under the General tab, populate the Task Name and Description fields. This tab also provides other options such as which user account is used and which versions of Windows the task is configured for.
4. Navigate to the Triggers tab and click on the New button to specify the schedule for a task.
5. Navigate to the Actions tab then click on the New button to define an action.
6. Click on the Action dropdown menu and select Start a Program from the list.
7. Now populate the Program/script window with the path for the Micromine executable on your machine. For example : "C:\Program Files\Micromine Origin & Beyond 2023.5\mmwin.exe"
8. To run a macro within a given project populate the Add Argument window with: -project "project name" -macro "macro_name.mcr"(e.g. -project "Drilling" -macro "database_update.mcr"). The same process can be used for python scripts so long as the Argument is defined correctly (-script "script_name.py".
9. Once the argument has been defined you can specify other special conditions or settings before clicking on the OK button of the Create Task dialog to complete the process.
10. To test the scheduled task once it is created you can right-click on it from the task list within the Task Schedule Library and select Run.
Want to learn more?
Click here to login to our Learning Management System
Click here to request access
Comments
0 comments
Please sign in to leave a comment.