Publish geoprocessing script? Schedule?

1198
2
08-07-2014 01:38 PM
MikeLouwrens
Occasional Contributor III

Hi,

I'm fairly new to ArcGIS Server, so trying to learn and do as much as I can

I have some arcpy python scripts I've written to do some data validation, and I manually run these a couple times a week...

  1. Is it possible to publish my script to ArcGIS Server and have Server run it?
  2. If #1 will work, would it be possible to schedule the script on Server to run nightly or weekly etc.?
  3. How?

Thanks,

Mike.

0 Kudos
2 Replies
SamDrummond2
New Contributor III

Hey Mike,


How are you? Welcome to the world of ArcGIS Server!

Firstly, you are absolutely able to publish your python scripts to ArcGIS Server as geoprocessing services. There will be a few considerations around which libraries you use, what input and output parameters you need and permissions.  However, I wonder if there might be a simpler and more efficient way to do this outside of ArcGIS Server.

In the past when I have worked with clients to schedule data validation scripts or ETL processes, we have done this using a Windows Task Scheduler and a simple batch file which runs the python script. This can be configured to run on a server using an ArcGIS Server licence (although you might want to double check with Esri the in's and out's of this).  This method avoids any performance overhead form ArcGIS Server and is simpler to script.

So to answer your questions from above:

1. Yes you are absolutely able to publish a script to ArcGIS Server as a Geoprocessing Service

2. Yes it is possible to schedule a script to run on a server - assuming this is a Microsoft Server then you would be able to schedule a task that ran a script based on your defined time frames.

3. As I alluded to above you would need to user Windows Task Scheduler and create a script that could trigger the geoprocessing service via its REST endpoint or if you don't use ArcGIS Server you can simply run the python script.

Happy to chat more if you've got questions?

Sam

0 Kudos
RiyasDeen
Occasional Contributor III

Have a look at below article.

32962 - Run a model as a Windows scheduled task

Untitled.png

0 Kudos