HOW TO

Automate ArcGIS Enterprise updates using Windows Task Scheduler

Last Published: February 11, 2021

Summary

This article provides instructions on how to create a CMD file, and utilize the file to automate updates for ArcGIS Enterprise components via Windows Task Scheduler.

Procedure

Create the CMD file

  1. Launch a text editor software such as Notepad.
  2. Enter the following script, and save the CMD file with the .cmd extension in a desired directory.
cd "<ArcGIS Enterprise installation directory>\tools\patchnotification" && call patchnotification.bat <parameters>
Note:
For a list of parameters and its functions, see below:
-h: Show usage
-p <proxy URL>: Proxy URL: http://user:pass@my.proxy.server.com:port
-k: Remove proxy settings
-s: Show current settings
-c: Run in console mode
-i  <sec> or -i <all>: Install security or all patches
-d <download directory>: Patch download parent folder
-o <never> or -o <always>: Delete option for patch download child folder.
The parameters in Windows Command Prompt

The following sample script runs the tool in console mode, and installs security patches:

cd "C:\Program Files\ArcGIS\Server\tools\patchnotification" && call patchnotification.bat -c -i sec
Note:
The patchnotification.bat file can be used in any ArcGIS Enterprise component machine (ArcGIS Server, Portal for ArcGIS, or ArcGIS Data Store). For single machine deployments, the tool can be used with any of the component's directories.

Create the task in Windows Task Scheduler

  1. Log on to the ArcGIS Enterprise component machine, and launch Windows Task Scheduler.
  2. In the left pane, right-click Task Scheduler Library, and select New Folder.... Name the folder.
  3. Right-click the new folder, and select Create Task.... The Create Task window displays.
  4. Click the General tab, and specify a Name and Description for the task.
  5. In the Security options section, select the ArcGIS Server Windows user account, and check the Run with highest privileges checkbox.
The General tab in the Create Task window to create a new task for Windows Task Scheduler.
  1. Click the Triggers tab, and click New.... The New Trigger window displays.
The Trigger tab in the Create Task window to create a new trigger.
  1. In the Settings section, select the desired frequency to run the task.
  2. In the Advanced settings section, check the Enabled checkbox. Click OK.
The New Trigger window with the frequency and advanced settings enabled.
  1. Click the Actions tab, and click New.... The New Action window displays.
  2. Select Start a program from the Actions drop-down list.
  3. In the Settings section, click Browse. Navigate to the directory of the CMD file created in Step 2 of the previous workflow, and select the CMD file. Click OK.
The New Action window to select the CMD file.
  1. Click the Conditions tab, and check any of the desired condition checkboxes.
  2. Click the Settings tab, and check any of the desired additional settings checkboxes.
  3. Click OK to save the task.

The task now displays in Windows Task Scheduler. The image example below displays a task configured to apply ArcGIS Enterprise security patches. The results can be viewed in the Windows Task Scheduler history, and in the ArcGIS Enterprise Patch Notification window.

Tcompleted task in Windows Task Scheduler and ArcGIS Enterprise Patch Notification window

Article ID:000024772

Software:
  • ArcGIS Data Store
  • Portal for ArcGIS
  • ArcGIS Server

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options