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, 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. When using a layer as input to a scheduled tool, the 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 signing in to the user account. This is required for the scheduled tool to run outside the ArcGIS Pro application.
Schedule a tool to run
Every geoprocessing tool can be scheduled. To schedule a geoprocessing tool, complete the following steps:
- Find the desired geoprocessing tool and open it.
- Specify tool parameters.
- 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 Geoprocessing > Scheduled Tasks section of the History pane, the tool scheduling is enabled, and the tool will run 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 displays 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 signed in to the machine for scheduled tools to run.
Each tool in the Scheduled section includes a list of the execution 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 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 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 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:00 a.m., the output dataset would be created as C:\Data\MyOutput.gdb\Output_03132020083000.
Additional scheduling options
Scheduled geoprocessing uses Windows Task Scheduler to run the tools you've selected at a specified time. You can find the geoprocessing tools you have scheduled 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 are displayed in Windows Task Scheduler.
Windows Task Scheduler provides additional scheduling options that are not available from the Schedule window in ArcGIS Pro.
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.
- 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.
- 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.