I have a batch file that executes an arcpy python script. When I run the batch file in the DOS command line, the script works perfectly. However, when I run the same batch file as a scheduled task, the python script runs but all of the lists are empty (which means none of the geoprocessing task run). For example, when I do a arcpy.ListRaster(), the output is empty using the scheduled task. When I run it in DOS, arcpy.ListRasters() contains items. Why would the arcpy functions not run correctly in the scheduled task, but run fine in a DOS prompt?
OS: Windows Server 2003
ArcGIS Desktop 10 SP2
python 2.6