Select to view content in your preferred language

Running a model from python script to use in Task Scheduler

434
0
01-30-2014 12:22 PM
RobertHupp
Deactivated User
Using examples from
http://blogs.esri.com/esri/arcgis/2011/06/24/exportmodeltopy/
and
http://joelmccune.com/2011/05/05/run-models-as-scheduled-tasks/
and posts from the forums here, I'm trying to run a model from modelbuilder to use in Task Manager.

The model works in ArcMap and the python code works in the python.exe interpreter when I run it and modifies the data in both cases.

The problem is in Task Scheduler, when I run the scheduler it results as sucess but the feature layer and data is not being altered.

Here is my python code to run model from the script:

import arcpy
arcpy.ImportToolbox("C:\\Users\\rh82134\\Documents\\ArcGIS\\Toolbox.tbx", "TBX")
arcpy.AFWtestauto_TBX()


I know my actions are set up right in Task Scheduler:
In progam/script I have C:\Python27\ArcGIS10.1\python.exe
and the argument to the .py file.

Can anybody help me with this?
Tags (2)
0 Kudos
0 Replies