I have a python geoprocessing script published to ArcGIS Server. The script adds domains and updates domains in a geodatabase. This script gets called by Maximo relatively infrequently, but when it does, I need to disconnect the users from the geodatabase, because ArcGIS throws a 000464 error. I don't want to disconnect users during business hours, and I can delay the modification of the domain until late at night.
How can I delay the running of a geoprocessing script once it has been triggered?
I'm not sure if it's possible, but the two things I can think of doing are:
- Adding a
time.sleepfunction in the code to sleep until the middle of the night
- Modifying the geoprocessing script to save a text file and then schedule the script to run overnight and pick up the file and process it then.
Neither of these seem particularly appealing to me and I'm looking for better options.