- Software: ArcGIS 10, 10. 1
- Operating System: Windows 7
You have a simple model you need to run at night or at a scheduled time. Once you are sure your model runs you can do the following. In this example I will be doing a very simple buffer to illustrate the process.
1. Click on Model -> Export -> To Python Script and give it a name. In this case I will call it buffer.py.
2. Inspect the Python Script. In this case it looks like:
# -*- coding: utf-8 -*-
# Created on: 2012-12-11 21:26:00.00000
# (generated by ArcGIS/ModelBuilder)
# Import arcpy module
# Local variables:
Input_DataSet = “Streams”
Streams = “D:\\Projects\\cra\\geodatabase\\CRA_current.gdb\\ConasaugaRiverWatershed\\Streams”
Output_Dataset = “C:\\modelbuilder\\output\\Buffer200Feet.shp”
# Process: Buffer
arcpy.Buffer_analysis(Streams, Output_Dataset, “200 Feet”, “FULL”, “ROUND”, “NONE”, “”)
3. Make sure that python is added to the path statement in Control Center -> Advanced System Settings -> Environment Variables
4. Open Task Scheduler
5. Click Create a Basic Task in the Actions Panel to the right. Give your task a descriptive name and a small description.
6. Determine when you want the task to run. Click Next. Then Select the time:
7. Select Start a program from the list of actions.
8. Select the script:
9: Finally at the end review your settings and click finish.
With any luck your scheduled task will run at the correct time. Please not that an ArcGIS license must be available for the script to run.