I have been doing some testing with models that I want to schedule and to start with I created a basic model that only creates a feature class within one of my file geodatabases.
My toolbox name is: CDWGeocoding
The alias name is: CDWGeo
Model name: ImportTest
This model has no parameters.
I've been running the following script (which completes just fine). The problem is the feature class is not being created. This runs fine with ArcGIS just not when running through a script.
import arcpy
import os
from datetime import datetime
print("Starting toolbox import.....")
arcpy.ImportToolbox(r"C:\Users\JOEBOBSMITH\Documents\ArcGIS\CDWGeocoding.tbx")
print("Import Complete")
print("Model executing.....")
try:
#CDWGeo is the toolbox alias
arcpy.ImportTest_CDWGeo
print("Model complete.")
except:
print arcy.GetMessages(2)
I've been using this page as a reference:
Scheduling a Python script or model to run at a prescribed time | ArcGIS Blog
Does anyone see any problems with this script? It seems pretty straight forward and simple. I'm sure it's something simple that I am missing. Thanks!