Skip to main content

Schedule notebook tasks

You can create tasks to schedule the automated run of a notebook. Each time the notebook is run according to the schedule you set, the site opens a new container and runs the notebook without user control.

In the Tasks pane in the notebook editor, you can create one or multiple scheduled tasks to run the notebook. You can schedule it to run once in the future or on a recurring basis—from once per minute to once every five months.

Create a task

When the notebook is ready, you can create a task to schedule its run. Using the Tasks pane in the notebook editor, you can create one or multiple tasks to automate runs of the notebook and specify the task's schedule.

To create a task, complete the following steps:

  1. Save the notebook with a title if you haven't already.

    The Tasks button becomes available on the top ribbon of the notebook editor.

  2. Click Create task to open the dialog box.

    Note:

    You can also create tasks from the Tasks tab on the notebook's item page.

  3. Provide a title in the Title text box to describe the task schedule, such as Weekly data cleaning run.

  4. If you have not configured parameters for the notebook and there are parameters you want to add to the notebook when it is run by the task, provide them in the Parameters section, and click Add to include the parameter in the workflow.

    If you have previously set up input parameters using the Parameters option, those parameters are automatically populated for the task. You can add, remove, or update any parameters specific to this task. Doing so will not change the default parameters for the notebook configured using the parameters option.

  5. Provide a key in the Key setting and its paired value in the Value setting for each parameter.

  6. Click Next to go to the Set task schedule details page.

    On this page, you can specify the particular schedule for this task. The schedule you specify is stored based on your web browser's local time zone.

    Tip:

    When you change the value for Repeat type, the options below it change to fit that selection. For example, if you select Month, a Day of the month box appears, allowing you to specify a day of the month or range of days for the task to run.

  7. Optionally, expand the Advanced section to enter the maximum number of minutes that the task can run.

    In the Advanced section, a Save parameters to notebook toggle button appears if you added parameters. Optionally, you can turn this on to save the inserted cell with the new parameters to the notebook when it is run.

  8. Optionally, in the Advanced section, turn on the Update notebook on completion toggle button to update the notebook with the results of each run.

  9. When you are satisfied with the title, optional parameters, and task schedule, click Create Task.

    The task is active and runs the notebook according to the schedule you set.

For multiple schedules—for example, with different parameters inserted—you can create more tasks for the notebook using the same workflow.

View and manage tasks

Once you create a task for a notebook, you can view the task's details and edit or delete it at any time. You can make changes to tasks either in the Tasks pane of the notebook editor or on the Tasks tab of the notebook's item page. In both places, you can view all tasks for the notebook with the time each task was created, when it was last modified, and its current status.

To work with existing tasks, complete the following steps:

  1. From the top ribbon of the notebook editor, click Tasks.

  2. In the Scheduled Tasks section, find the task that you want to work with.

  3. Click Actions next to the task and do any of the following:

    • Click Details to review the results of each run of the task. A preview of the notebook is stored with the details of each task run.

      Note:

      The notebook preview does not include rendering of map widgets that are in the notebook. Map widgets are only rendered in the notebook and are not rendered in the static preview included with the result of a scheduled task.

    • Click Edit to change the title, parameters, or schedule of the task.

    • Click Pause to pause an active task, and click Resume to resume the task.

    • Click Delete to remove the task.

      Note:

      Deleting a task also deletes the run history of the task. To preserve an active task's history, consider pausing the task to stop further runs.

Changing ownership of a notebook also changes the ownership of that notebook's tasks. The tasks are transferred to the new user in an inactive state. The new owner can enable the tasks in the Tasks pane of the notebook editor or on the Tasks tab of the notebook's item page.

See Manage scheduled tasks for more information on managing tasks across multiple items.