Geoprocessing tools can be run immediately or scheduled to run at a later time or with recurrence. Scheduling a geoprocessing tool allows you to do the following:
- Automate a tool you need to run regularly.
- Run a long-running or computationally intensive process at a convenient, specified time when you will not be using the machine for other tasks.
- Run multiple geoprocessing tools concurrently outside the ArcGIS Pro application using a stand-alone Python executable.
To schedule a geoprocessing tool, you will fill in all required tool parameters, click the Schedule command, and specify options about when the scheduled tool should run. You can manage the tools you have scheduled in the Geoprocessing>Scheduled section of the History pane.
You can use layers from the maps in your project as input to scheduled geoprocessing tools, or you can browse to specify full dataset paths to use as input. Browsing and specifying full paths to input datasets is best practice for scheduling geoprocessing tools. This ensures that the scheduler can find and use the input datasets regardless of the availability and status of the layer's source project. For example, you may select a layer from a map as input to the tool you are scheduling. This layer reference in the scheduled tool requires that the project be saved and present in the location the project existed when the tool was scheduled, otherwise when the schedule runs, the tool will fail with an error stating the dataset does not exist.
Scheduling a geoprocessing tool is possible with all licensing types supported by ArcGIS Pro. However, for Named User licensing, you must check the Sign me in automatically check box when logging in to the user account. This is required for the scheduled tool to run outside the ArcGIS Pro application.
Every geoprocessing tool can be scheduled. To schedule a geoprocessing tool, complete the following steps:
- Find the desired geoprocessing tool and open it.
- Specify all desired tool parameters.
- Choose to run the tool immediately or schedule the geoprocessing tool to run at a later time. Use the Run button split menu to 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 should run. Click OK to finish and schedule the tool.
The scheduled tool will be added to the Geoprocessing > Scheduled Tasks section of the History pane, the tool scheduling will be enabled, and the tool will begin running at the date and time you specified in the Schedule window.
Manage scheduled tools
Scheduled geoprocessing tools are listed in the Geoprocessing>Scheduled section of the History pane. The Scheduled section will display all tools that are scheduled to run on the machine using your user account, regardless of the project from which the tools were scheduled, in alphabetical order. You must be logged in to the machine for scheduled tools to run.
Each tool in the Scheduled section will include a list of the execution history of the tool. Each time the scheduled tool runs, a new time-stamped item will be added below the entry for the scheduled tool with an icon indicating whether the execution completed successfully or failed.
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 right-click context menu of your scheduled tools, as well as the quick commands available when you hover over a scheduled tool:
- Click Edit Schedule to change schedule options such as date and time, recurrence, expiration, and other options.
- Click Run to immediately run the scheduled tool. This is useful for testing fast-running processes that you have scheduled to run some time in the future, to ensure 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 the tool is resumed by clicking Resume Schedule.
- Click Clear Run Log to clear the execution history of a scheduled tool. This has no effect on future executions 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 future scheduled executions of the tool, clears the execution history of the scheduled tool, and removes the tool from the Scheduled section.
Extend scheduled geoprocessing
Scheduling a geoprocessing tool creates a folder and several files including a Python script in the user directory %localappdata%\Esri\ArcGISPro\Geoprocessing\<your scheduled tool name>. 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.
Overwrite or create new 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 a new 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 a new output dataset every time the scheduled tool runs, use the timestamp variable %t% in your 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:00am, the output dataset would be created C:\Data\MyOutput.gdb\Output_03132020083000.
Additional scheduling options
Scheduled geoprocessing uses Windows Task Scheduler to automatically run the tools you've selected at the correct time. You can find the geoprocessing tools you have scheduled from within ArcGIS Pro in Windows Task Scheduler under the name of the task you specified in the Schedule window. The schedule settings you specified in ArcGIS Pro will be displayed in Windows Task Scheduler.
Windows Task Scheduler provides you with additional scheduling options that are not available from the Schedule window in ArcGIS Pro. These options include the following:
- Run whether user is logged on or not.
- Run with elevated or admin privileges.
- Stop task if it runs longer than a specified period of time.
- Begin the task at log on, startup, 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.
- Choices for what happens if a task is still running when the task is scheduled to run again.
- 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 any special considerations.