Create and manage scheduled notebook jobs
You can create and manage notebook jobs directly in the notebook UI. If a notebook is already assigned to one or more jobs, you can create and manage schedules for those jobs. If a notebook is not assigned to a job, you can create a job and a schedule to run the notebook. To learn more about scheduling jobs, see Run jobs on a schedule.
Schedule a notebook job
To schedule a notebook job to run periodically:
In the notebook, click Schedule at the top right. If no jobs exist for this notebook, the Schedule dialog appears.
If jobs already exist for the notebook, the Jobs List dialog appears. To display the Schedule dialog, click Add a schedule.
In the Schedule dialog, optionally enter a name for the job. The default name is the name of the notebook.
Select Simple to run your job on a simple schedule, such as every day, or Advanced to define a custom schedule for running the job, such as a specific time every day. Use the drop-downs to specify the frequency. If you choose Advanced, you can also use cron syntax to specify the frequency.
In the Compute drop-down, select the compute resource to run the task.
If the notebook is attached to a SQL warehouse, the default compute is the same SQL warehouse.
If your workspace is Unity Catalog-enabled and Serverless Jobs is enabled, the job runs on serverless compute by default.
Otherwise, if you have Allow Cluster Creation permissions, the job runs on a new job cluster by default. To edit the configuration of the default job cluster, click Edit at the right of the field to display the cluster configuration dialog. If you do not have Allow Cluster Creation permissions, the job runs on the cluster that the notebook is attached to by default. If the notebook is not attached to a cluster, you must select a cluster from the Cluster dropdown.
Optionally, under More options, you can specify email addresses to receive Alerts on job events. See Add email and system notifications for job events.
Optionally, under More options, enter any Parameters to pass to the job. Click Add and specify the key and value of each parameter. Parameters set the value of the notebook widget specified by the key of the parameter. Use dynamic value references to pass a limited set of dynamic values as part of a parameter value.
Click Create.
Run a notebook job
To manually run a notebook job:
In the notebook, click Schedule at the top right.
Click next to the scheduled job, then click Run now.
To view the job run details, click the job name.
Manage scheduled notebook jobs
To display jobs associated with this notebook, click the Schedule button. The jobs list dialog appears, showing all jobs currently defined for this notebook. To manage jobs, click at the right of a job in the list.
From this menu, you can edit the schedule, clone the job, view job run details, pause the job, resume the job, or delete a scheduled job.
When you clone a scheduled job, a new job is created with the same parameters as the original. The new job appears in the list with the name Clone of <initial job name>
.
How you edit a job depends on the complexity of the job’s schedule. Either the Schedule dialog or the job details panel displays, allowing you to edit the schedule, cluster, parameters, and so on. See Trigger types for Databricks Jobs.