Automated execution of ArcGIS Notebooks is available starting at 10.8. When a user with notebook privileges uses the Execute Notebook operation, either through a browser or through a script, the site opens a new container and runs the notebook without user control. Because this operation can be run through a script, it can be used to schedule automated notebook execution.
Learn more about automated execution
If you are preparing a notebook for automated execution, such as on a recurring basis, there are a few things to keep in mind.
Add parameters tag
The Execute Notebook operation offers the option to insert parameters as a new cell at execution time, such as account credentials or variables to define.
The operation uses the Tags cell toolbar option, which allows you to create and manage tags for each cell in the notebook workspace. You can change the cell toolbar options by clicking View > Cell Toolbar.
You can designate the place in the notebook where this new cell is added by adding the tag parameters to a cell in your notebook. The new cell is inserted after this cell. Only one cell with the parameters tag is recognized by the operation.
Content to avoid
Other than the parameters cell it can insert, the Execute Notebook operation does not support any user interaction with notebooks it runs. Avoid adding any content that requires user interaction while your notebook runs, such as clicking a point on a map.
Any credentials or new variables you want added at the time of automated execution must be inserted in the parameters cell, as shown above. Make sure your notebook does not contain any content that will stop the notebook from completing.