Run a geoprocessing tool immediately or schedule it to run at a later time or with recurrence. Scheduling a geoprocessing tool allows you to do the following:
- Automate a tool to run regularly.
- Run a long-running or computationally intensive process at a convenient time.
- Run multiple geoprocessing tools concurrently using a stand-alone Python script.
Note:
Scheduling a geoprocessing tool is possible with all ArcGIS Pro license levels. When using a Named User license, check the Sign me in automatically check box when signing in to the user account. This is required for the tool to run outside ArcGIS Pro in the scheduled tool Python process.
Schedule a tool to run
Every geoprocessing tool can be scheduled. To schedule a geoprocessing tool, complete the following steps:
- Find the geoprocessing tool and open it.
Note:
While all tools can be scheduled, tools that update layers or maps such as Select Layer By Attribute, Select Layer By Location, or Make Feature Layer, will not have their processing take effect in the project. For example, when the scheduled Select Layer By Attribute tool runs, the selection does not display in the project. The stand-alone Python process that runs scheduled tools does not make updates to the layers and maps in a project. However, if these tools are part of a larger process in a scheduled model tool or script tool, the tools will run as expected, and their result will be used for further processing.
- Specify tool parameters.
The parameter values you specify will be used every time the scheduled tool runs.
Note:
When scheduling a tool, use the full path to a dataset instead of layers from a map. Using a full path ensures that the tool will work regardless of the availability and status of a layer and project. Using a layer requires that the project be saved and available in the location the project existed when the tool was scheduled. Otherwise, when the scheduled tool runs, it will fail with an error stating the input does not exist.
The same is true when scheduling a tool that uses a map as input. Specify a map parameter with a full path to the project and map, such as C:\Projects\City.aprx\StreetMap. Then save the project before scheduling so that the current map contents will be available to use in the external process. Using only the map name as input will not work and may result in an error or unexpected results.
- Optionally, specify tool environments.
- Click the Run button split menu and choose Schedule .
- In the Schedule window, specify the task name, start date and time, recurrence, expiration, and other options for how and when the scheduled tool will run. Click OK to finish and schedule the tool.
The scheduled tool is added to the Scheduled Tools section of the Geoprocessing tab in the History pane, the tool scheduling is enabled, and the tool will run at the specified date and time.
Manage scheduled tools
The Scheduled Tools section of the Geoprocessing tab in the History pane lists all tools that are scheduled to run on the machine using your user account, regardless of the project from which the tools were scheduled. You must be signed in to the machine for scheduled tools to run.
Each tool in the Scheduled Tools section includes a list of the history of the tool. Each time the scheduled tool runs, a new time-stamped item is added below the entry for the scheduled tool with an icon indicating whether the tool completed successfully or failed.
Icon | Status |
---|---|
The tool completed successfully. | |
The tool completed with warnings. Click View Details or hover over the status icon to view the warning messages. | |
The tool failed. Click View Details or hover over the status icon to view the error messages. |
You can manage scheduled geoprocessing tools in the following ways using the context menu of the scheduled tools, as well as the quick commands available when you hover over a scheduled tool:
- Click Edit Schedule to change the schedule options such as date and time, recurrence, expiration, and others.
- Click Run to immediately run the scheduled tool. This is useful for testing fast-running processes that you scheduled to run some time in the future to ensure that the tool can complete successfully.
- Click Pause Schedule to stop future runs of the scheduled tool. When a scheduled tool is paused, it will not run on the schedule again until you click Resume Schedule.
- Click Clear Run Log to clear the history of a scheduled tool. This has no effect on future runs of the tool.
- Click Delete Schedule to disable and remove the scheduled tool and delete the associated scripts, log files, and folders. This stops any scheduled runs of the tool, clears the history of the scheduled tool, and removes the tool from the Scheduled section.
Log scheduled tools
Options for logging geoprocessing operations apply to scheduled tools. In addition to the Scheduled section, the logging capabilities may be useful for tracking the scheduled tools. If the Write geoprocessing operations to XML log file option is enabled, scheduled tools will create log files in the %APPDATA%\ESRI\ArcGISPro\ArcToolbox\History directory. If the Write geoprocessing operations to dataset metadata option is enabled, scheduled tools will update the Geoprocessing History section of the dataset metadata with details about the scheduled tools.
Extend scheduled geoprocessing
Scheduling a geoprocessing tool creates a folder and several files including a Python script in the %localappdata%\Esri\ArcGISPro\Geoprocessing\<your scheduled tool name> user directory. You can extend the scheduled operation to include multiple geoprocessing tools by editing the Python script in the scheduled tool folder and adding more geoprocessing tools to the script.
Learn more about adding geoprocessing tools to a Python script
Overwrite or create output datasets
When scheduling a geoprocessing tool that creates an output dataset, you must decide whether you want the scheduled tool to overwrite the same output dataset every time the scheduled tool runs, or create an output dataset each time the tool runs.
- To overwrite the same output dataset every time the scheduled tool runs, use a standard dataset path in the output parameter text box, such as C:\Data\MyOutput.gdb\Output.
- To create an output dataset every time the scheduled tool runs, use the time stamp variable %t% in the dataset path in the output parameter text box to automatically name the output dataset based on the time the tool ran.
For example, an output dataset path such as C:\Data\MyOutput.gdb\Output_%t% can be specified, and if the tool ran on March 13, 2020, at 08:30:00 a.m., the output dataset would be created as C:\Data\MyOutput.gdb\Output_03132020083000.
Remote data sources
Input data from remote data sources such as enterprise geodatabases or feature services can be used in scheduled geoprocessing tools. You can browse to or specify the full path to these data sources as input, or use map layers that refer to them. To use remote data sources that require permissions or credentials in a scheduled tool, when you make a connection to the server, portal, or enterprise geodatabase source of the data, you must save your username and password credentials.
- For stand-alone services that require credentials, when making the server connection or when prompted for credentials, check the Save Username / Password check box.
- For portal web layers, when connecting to the portal, check the Sign in Automatically check box.
- For enterprise geodatabase data, when connecting to the database, check the Save User/Password check box.
Note:
Use these options to save remote data access credentials before scheduling a tool. Otherwise, the scheduled tool may fail and produce an error message indicating that the data is not valid or does not exist.
Additional scheduling options
Scheduling geoprocessing tools uses Windows Task Scheduler to run the selected tools at a specified time. The geoprocessing tools you scheduled in ArcGIS Pro display in Windows Task Scheduler under the name of the task you specified in the Schedule window. The schedule settings you specified in ArcGIS Pro are also displayed in Windows Task Scheduler.
Windows Task Scheduler provides additional scheduling options that are not available in the Schedule window in ArcGIS Pro.
Note:
To modify additional scheduling options in Windows Task Scheduler, you must be signed in as a user account in the computer's local administrator group. To use the Run whether user is logged on or not option, the account that you specify the task to run with must be in the computer's local administrator group. The computer may have a group policy set by your system administrator that prevents scheduled tools from being run when your user account is not signed in due to security risk. Contact your system administrator for more information.
Additional scheduling options include the following:
- Run whether or not the user is signed in.
- Run with elevated or admin privileges.
- Stop the task if it runs longer than a specified period of time.
- Begin the task at sign in, when the computer starts up, or on other events.
- Send an email or display a message before the task starts or after it completes (both options are marked deprecated by Windows).
- Run only if the computer is idle.
- Wake the computer to run.
- Run only on AC power.
- If the task fails, retry after a specified period of time.
- Choose what happens if a task is still running when the task is scheduled to run again.
Note:
If permitted, consider running critical scheduled tasks with a generic user account. This avoids associating the process with a specific user account.
Extension tools
When using a Concurrent Use license and you are using an extension tool directly or as part of a model or script tool, consider the following:
- If scheduling an extension tool directly or a model tool that includes an extension tool, no special steps are required.
- If scheduling a script tool that includes an extension tool, the script must include CheckOutExtension calls to check out the appropriate extensions.
If you are using a Named User or Single Use license, extension tools can be used without special considerations.