charlesfox123

Phyton script fails to work through Windows 7 Task Scheduler

Discussion created by charlesfox123 on May 14, 2012
Latest reply on May 14, 2012 by charlesfox123
I am having difficulty making a Phyton script work through Windows 7 Task Scheduler. I created a Model and exported the Model to Python and then tried to schedule the script to run on Windows scheduler but I keep getting errors. The Model runs fine but the script fails each time.

The Exported script is below:

# ---------------------------------------------------------------------------
# Centerline_Update_COMMON_SDE.py
# Created on: 2012-05-10 16:34:42.00000
#   (generated by ArcGIS/ModelBuilder)
# Description:
# ---------------------------------------------------------------------------

# Import arcpy module
import arcpy


# Local variables:
Centerline_Update_New_shp = "C:\\DRIVE_D_LAST_COMPUTER_DIT51_MJ\\E_911_Data_06_2010\\E_911_Centerline_Update_2012\\Centerline_Update_New.shp"
COMMON_SDE_CENTERLINE_METADATA_xml = "C:\\DRIVE_D_LAST_COMPUTER_DIT51_MJ\\E_911_Data_06_2010\\E_911_Centerline_Update_2012\\COMMON_SDE_CENTERLINE_METADATA.xml"
devGIScommon_CREATOR_COMMON_trn_Centerline = "Database Connections\\TEST_Database Connection to vgissdedev.sde\\devGIScommon.CREATOR_COMMON.Transportation\\devGIScommon.CREATOR_COMMON.trn_Centerline"

# Process: Copy Features
arcpy.CopyFeatures_management(Centerline_Update_New_shp, devGIScommon_CREATOR_COMMON_trn_Centerline, "", "0", "0", "0")

# Process: Metadata Importer
arcpy.MetadataImporter_conversion(COMMON_SDE_CENTERLINE_METADATA_xml, devGIScommon_CREATOR_COMMON_trn_Centerline)



Any help would be greatly appreciated. Thanks,



Charles

Outcomes