Scheduling a Python script to run at prescribed times
How to schedule a geoprocessing script to run at prescribed times
Scheduled Tasks
Steps:
- The method to schedule a script depends on your system.
- For Windows XP:
- Click the Windows Start menu, point to Control Panel, then double-click Scheduled Tasks.
- If the control panel is in category view, click Performance and Maintenance and click Scheduled Tasks.
- For Windows 2000 and NT:
- Click the Windows Start menu, point to Settings, point to Control Panel, then click Scheduled Tasks.
- For Windows Vista:
- Click the Windows Start menu, click Settings, point to Control Panel, then click System and Maintenance. Click Administrative Tools and click Schedule tasks.
- For Windows 7
- Click the Windows Start menu, click Control Panel > Administrative Tools and click Task Scheduler.Note:
If Control Panel is in category view, click System and Security, click Administrative Tools, then click Task Scheduler.
- Click the Windows Start menu, click Control Panel > Administrative Tools and click Task Scheduler.
- For Windows XP:
- Double-click Add Scheduled Task.
-
Complete the options on the wizard.
- When asked to click the program you want Windows to run, click the Browse button and the Python script.
If the program you want to run is a Python script with arguments
For more information about scheduled tasks, see the Windows Help.
Steps:
- On the last pane of Schedule Task Wizard, check the Open advanced properties check box.
-
On the Task Properties dialog box, change Run to contain the Python executable, your script, and the arguments you want the script to run, as shown in the following example.
c:\python26\python.exe c:\gisWork\myscript.py c:\gisWork\gdb.mdb\counties 10
12/15/2011