AnsweredAssumed Answered

Trying to edit a Python from a Model to be run by Task Scheduler

Question asked by cpd_cgiberti on Apr 23, 2018
Latest reply on Apr 23, 2018 by asrujit_pb

I'm trying to take a model already built in access, and reduce it to a python script that can be run by Windows Task Scheduler. I've got the Python script already (Just exported it from ArcCatalog) but I don't understand the edits I need to make to allow Task Scheduler to run it. My python code is listed:

# Import arcpy module
import arcpy


# Local variables:
Offenses_Past3Days = "H:\\Crime_Analysts\\Reports\\BeatBulletin\\BeatBulletin_DataDump.mdb\\Offenses_Past3Days"
CintiAddLoc_Streets = "H:\\Crime_Analysts\\GIS\\Cincinnati.gdb\\CintiAddLoc_Streets"
Offenses_Past3Days__2_ = "H:\\Crime_Analysts\\Reports\\BeatBulletin\\BeatBulletinWorkSpace.gdb\\Offenses_Past3Days"
Offenses_RiskCIRVPriOff_ForArc = "H:\\Crime_Analysts\\Reports\\BeatBulletin\\BeatBulletin_DataDump.mdb\\Offenses_RiskCIRVPriOff_ForArc"
PriorityOffenderOffenses = "H:\\Crime_Analysts\\Reports\\BeatBulletin\\BeatBulletinWorkSpace.gdb\\PriorityOffenderOffenses"

# Process: Geocode Addresses
arcpy.GeocodeAddresses_geocoding(Offenses_Past3Days, CintiAddLoc_Streets, "Street Address VISIBLE NONE", Offenses_Past3Days__2_, "STATIC")

# Process: Geocode Addresses (2)
arcpy.GeocodeAddresses_geocoding(Offenses_RiskCIRVPriOff_ForArc, CintiAddLoc_Streets, "Street Address VISIBLE NONE", PriorityOffenderOffenses, "STATIC")

Outcomes