Select to view content in your preferred language

Python script not working in Windows scheduler

6340
16
09-25-2014 06:06 AM
JonahWaterman
Regular Contributor

I have created a model to delete a database and then copy the sde feature classes to a file geodatabse and it works sucessfully in modelbuilder when I try and schedule it as a task in Windows scheduler its running but not giving me my results, I keep getting a (0X1) expression under theLastsuccessfully tab. THX FOR YOUR HELP1.png2.png3.png4.png

Tags (1)
0 Kudos
16 Replies
JakeSkinner
Esri Esteemed Contributor

Hi Jonah,

What program/executable are you specifying for the 'Start in' option?

0 Kudos
JonahWaterman
Regular Contributor

Nothing, I did try posting the ArcMAP startup executable but without any sucess

0 Kudos
AsrujitSengupta
Deactivated User

Have a look at the below Blog and link and make sure you are following the steps correctly:

Scheduling a Python script or model to run at a prescribed time | ArcGIS Blog

Scheduling a Python script to run at prescribed times:

ArcGIS Help (10.2, 10.2.1, and 10.2.2)

JonahWaterman
Regular Contributor

Yeah i have other scripts working successfully however the only thing I can think about is the successfully run ones all the data is hosted locally on my C: Drive. The one that is not working is hosted locally but is pulling feature classes from the server. Does that have any effect????

0 Kudos
AsrujitSengupta
Deactivated User

To narrow down the cause of the issue, you can try modifying it to host locally and check if that works.

0 Kudos
curtvprice
MVP Esteemed Contributor

> The one that is not working is hosted locally but is pulling feature classes from the server. Does that have any effect????

The default security for regular Windows users in Task Scheduler is not allow access to networks or devices unless the user is logged in. You may want to look into your group policy settings and see if you can get them changed.

0 Kudos
TedCronin
MVP Honored Contributor

or even to Lock your workstation as you.  This is how I have been doing it for the last 7 years, good or bad, it works.

0 Kudos
by Anonymous User
Not applicable

Check the "Run with highest privileges" check box.

And what are you including in the "Program/script" field in the "Edit/Action" text box? I don't remember if models are exposed itself as any kind of executable file or only tbx files are....

Jesús de Diego

0 Kudos
JonahWaterman
Regular Contributor

1.pngC:\DataReviewer_GUC\PythonScripts\Sewer_DatabaseTransfer.py

This is what is under the Progra/Script

0 Kudos