How do I schedule a geoprocessing script to run at prescribed times?
Scripts can be scheduled to run at a later time—for example at midnight—or they can be scheduled to run daily, weekly or monthly. To do this you will need to use Windows Scheduled Tasks, which is available with Windows 2000 and Windows XP and sometimes available on Windows NT.
It is found in the following locations:
Windows XP: Start Menu > Control Panel > Scheduled Tasks. If the control panel is in Category View, select Performance and Maintenance > Scheduled Tasks.
Windows 2000 and NT: Start Menu > Settings > Control Panel > Scheduled Tasks
Having reached Scheduled Tasks, double-click Add Scheduled Task. Complete the options on the wizard.
Here are a few tips:
When asked to Click the program you want Windows to run, select the Browse button and the script.
If the program you want to run is a Python script with arguments:
In c:\python2x\, select Program you want Windows to run and select python.exe.
On the last pane of the wizard, check Open advanced properties.
In the Task properties dialog box, change 'Run:' to contain the python executable, your script, and the arguments you want the script to run. For example: c:\python21\python.exe c:\gisWork\myscript.exe c:\gisWork\gdb.mdb\counties 10
If I create a script to share with someone that includes tools at a license level higher than they have, or includes extension product tools that they don't have, will the script run?
No. To execute the script successfully your user will need licensing for all the tools you call in the script.
Where can I find additional information about geoprocessing scripts, including samples?
Yes. It's possible to use Arc Macro Language files (AMLs) developed in the ArcGIS 9.x Desktop environment by creating a new geoprocessing script tool. If you have an ArcInfo license and ArcInfo Workstation installed, you can add a custom script tool that references an AML.
By default, outpus from geoprocessing tools are not overwritten. If you want your outputs to be overwritten you need to add the following line of code to your Python script: