Stay organized with collections
Save and categorize content based on your preferences.
Schedule a notebook run
This page shows you how to schedule a notebook run in Colab Enterprise.
Overview
You can schedule a notebook to run immediately one time, or on a
recurring schedule.
When you schedule the notebook run, you select a runtime template.
Colab Enterprise uses this runtime template to create the runtime
that runs your notebook.
The runtime needs specific permissions to run the notebook's code and
access Google Cloud services and APIs.
If your runtime template configuration has end-user credentials enabled,
then the runtime uses the permissions associated with your
user credentials.
If end-user credentials aren't enabled, you must specify a service account
when you schedule the notebook run. Colab Enterprise uses this
service account's credentials to run your notebook.
After Colab Enterprise completes the notebook run, the results are
stored in a shareable Cloud Storage bucket.
Limitations
Colab Enterprise runtimes use Compute Engine quota. See the
Compute Engine Allocation quotas page.
Before you begin
Sign in to your Google Cloud account. If you're new to
Google Cloud,
create an account to evaluate how our products perform in
real-world scenarios. New customers also get $300 in free credits to
run, test, and deploy workloads.
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
Roles required to select or create a project
Select a project: Selecting a project doesn't require a specific
IAM role—you can select any project that you've been
granted a role on.
Create a project: To create a project, you need the Project Creator role
(roles/resourcemanager.projectCreator), which contains the
resourcemanager.projects.create permission. Learn how to grant
roles.
Enable the Vertex AI, Dataform, and Compute Engine APIs.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM
role (roles/serviceusage.serviceUsageAdmin), which
contains the serviceusage.services.enable permission. Learn how to grant
roles.
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
Roles required to select or create a project
Select a project: Selecting a project doesn't require a specific
IAM role—you can select any project that you've been
granted a role on.
Create a project: To create a project, you need the Project Creator role
(roles/resourcemanager.projectCreator), which contains the
resourcemanager.projects.create permission. Learn how to grant
roles.
Enable the Vertex AI, Dataform, and Compute Engine APIs.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM
role (roles/serviceusage.serviceUsageAdmin), which
contains the serviceusage.services.enable permission. Learn how to grant
roles.
To get the permissions that
you need to schedule a notebook run in Colab Enterprise,
ask your administrator to grant you the
following IAM roles on the project:
The principal that runs the notebook needs specific permissions. The
principal is either your user account or a service account that you specify,
as described in the overview.
To get the permissions that
you need to run a notebook in Colab Enterprise,
ask your administrator to grant you the
following IAM roles:
Code Viewer (roles/dataform.codeViewer)
on the notebook
Logs Writer (roles/logging.logWriter)
on the project
These predefined roles contain
the permissions required to run a notebook in Colab Enterprise. To see the exact permissions that are
required, expand the Required permissions section:
Required permissions
The following permissions are required to run a notebook in Colab Enterprise:
dataform.locations.list
on the notebook
dataform.repositories.computeAccessTokenStatus
on the notebook
dataform.repositories.fetchHistory
on the notebook
dataform.repositories.fetchRemoteBranches
on the notebook
dataform.repositories.get
on the notebook
dataform.repositories.getIamPolicy
on the notebook
dataform.repositories.list
on the notebook
dataform.repositories.queryDirectoryContents
on the notebook
dataform.repositories.readFile
on the notebook
logging.logEntries.create
on the project
logging.logEntries.route
on the project
monitoring.metricDescriptors.create
on the project
monitoring.metricDescriptors.get
on the project
monitoring.metricDescriptors.list
on the project
monitoring.monitoredResourceDescriptors.get
on the project
monitoring.monitoredResourceDescriptors.list
on the project
monitoring.timeSeries.create
on the project
resourcemanager.projects.get
on the project
resourcemanager.projects.list
on the project
storage.buckets.get
on the notebook
storage.managedFolders.create
on the notebook
storage.managedFolders.delete
on the notebook
storage.managedFolders.get
on the notebook
storage.managedFolders.list
on the notebook
storage.multipartUploads.abort
on the notebook
storage.multipartUploads.create
on the notebook
storage.multipartUploads.list
on the notebook
storage.multipartUploads.listParts
on the notebook
In the Region menu, select the region that contains your notebook.
Next to a notebook, click the
more_vertNotebook actions
menu and select Schedule.
In the Schedule name field, enter a name for your
schedule.
Click the Runtime template list, and select a
runtime template. The runtime template determines the specifications
of the runtime that runs your notebook.
Under Run schedule, select One-off
to run your notebook as soon as you submit the notebook run.
Next to the Cloud Storage output location
field, click Browse to open the
Select folder dialog.
Select a Cloud Storage bucket. Or, to create a bucket, click
Create
new bucket and complete the dialog.
If you selected a runtime template without end-user credentials enabled,
the dialog includes a Service account field. In the
Service account field, enter a service account's
email address.
Click Submit.
The notebook run starts immediately.
gcloud
Before using any of the command data below,
make the following replacements:
DISPLAY_NAME: the display name for your notebook run.
NOTEBOOK_RUNTIME_TEMPLATE: the notebook runtime template
that specifies your runtime's compute configuration.
NOTEBOOK_URI: the Cloud Storage URI of the
notebook to run.
OUTPUT_URI: the Cloud Storage location where you want to
store results.
USER_EMAIL: the user account email address that specifies
the notebook run's access to Google Cloud resources.
To run the following code sample, you'll need the Dataform
repository ID of your notebook. To get the repository ID of your notebook,
you can use Dataform's
list_repositories
method.
fromgoogle.cloudimportaiplatform_v1PROJECT_ID="my-project"LOCATION="us-central1"REPOSITORY_ID="b223577f-a3fb-482c-a22c-0658c6602598"TEMPLATE_ID="6524523989455339520"API_ENDPOINT=f"{LOCATION}-aiplatform.googleapis.com"PARENT=f"projects/{PROJECT_ID}/locations/{LOCATION}"notebook_service_client=aiplatform_v1.NotebookServiceClient(client_options={"api_endpoint":API_ENDPOINT,})operation=notebook_service_client.create_notebook_execution_job(parent=PARENT,notebook_execution_job={"display_name":"my-execution-job",# Specify a NotebookRuntimeTemplate to source compute configuration from"notebook_runtime_template_resource_name":f"projects/{PROJECT_ID}/locations/{LOCATION}/notebookRuntimeTemplates/{TEMPLATE_ID}",# Specify a Colab Enterprise notebook to run"dataform_repository_source":{"dataform_repository_resource_name":f"projects/{PROJECT_ID}/locations/{LOCATION}/repositories/{REPOSITORY_ID}",},# Specify a Cloud Storage bucket to store output artifacts"gcs_output_uri":"gs://my-bucket/",# Specify the identity that runs the notebook"execution_user":"{EMAIL}",# Run as the service account instead# "service_account": "my-service-account",})print("Waiting for operation to complete...")result=operation.result()
In the Region menu, select the region that contains your notebook.
Next to a notebook, click the
more_vertNotebook actions
menu and select Schedule.
In the Schedule name field, enter a name for your
schedule.
Click the Runtime template list, and select a
runtime template. The runtime template determines the specifications
of the runtime that runs your notebook.
Under Run schedule, select Recurring
to schedule the notebook run for a specific interval of time.
Complete the scheduling dialog.
Next to the Cloud Storage output location
field, click Browse to open the
Select folder dialog.
Select a Cloud Storage bucket. Or, to create a bucket, click
Create
new bucket and complete the dialog.
If you selected a runtime template without end-user credentials enabled,
the dialog includes a Service account field. In the
Service account field, enter a service account's
email address.
Click Submit.
Scheduled notebook runs start automatically on the schedule that you set.
gcloud
Before using any of the command data below,
make the following replacements:
DISPLAY_NAME: the display name of your schedule.
CRON_SCHEDULE: the schedule that you set, in
unix-cron format.
For example, 00 19 * * MON means weekly on Monday, at 1900 hours
Greenwich Mean Time (GMT).
NOTEBOOK_RUN_NAME: the display name for notebook runs generated
by this schedule.
NOTEBOOK_RUNTIME_TEMPLATE: the notebook runtime template
that specifies your runtime's compute configuration.
NOTEBOOK_URI: the Cloud Storage URI of the
notebook to run.
OUTPUT_URI: the Cloud Storage location where you want to
store results.
USER_EMAIL: the user account email address that specifies
the notebook run's access to Google Cloud resources.
To run the following code sample, you'll need the Dataform
repository ID of your notebook. To get the repository ID of your notebook,
you can use Dataform's
list_repositories
method.
fromgoogle.cloudimportaiplatform_v1PROJECT_ID="my-project"LOCATION="us-central1"REPOSITORY_ID="b223577f-a3fb-482c-a22c-0658c6602598"TEMPLATE_ID="6524523989455339520"API_ENDPOINT=f"{LOCATION}-aiplatform.googleapis.com"PARENT=f"projects/{PROJECT_ID}/locations/{LOCATION}"schedules_service_client=aiplatform_v1.ScheduleServiceClient(client_options={"api_endpoint":API_ENDPOINT,})schedule=schedules_service_client.create_schedule(parent=PARENT,schedule={"display_name":"my-notebook-schedule",# Time specification. TZ is optional.# cron = "* * * * *" to run it in the next minute."cron":"TZ=America/Los_Angeles * * * * *",# How many runs the schedule will trigger before it becomes COMPLETED.# A Schedule in COMPLETED state will not trigger any more runs."max_run_count":1,"max_concurrent_run_count":1,"create_notebook_execution_job_request":{"parent":PARENT,"notebook_execution_job":{"display_name":"my-execution-job",# Specify a NotebookRuntimeTemplate to source compute configuration from"notebook_runtime_template_resource_name":f"projects/{PROJECT_ID}/locations/{LOCATION}/notebookRuntimeTemplates/{TEMPLATE_ID}",# Specify a Colab Enterprise notebook to run"dataform_repository_source":{"dataform_repository_resource_name":f"projects/{PROJECT_ID}/locations/{LOCATION}/repositories/{REPOSITORY_ID}",},# Specify a Cloud Storage bucket to store output artifacts"gcs_output_uri":"gs://my-bucket/",# Specify the identity that runs the notebook"execution_user":"{EMAIL}",# Run as the service account instead# "service_account": "my-service-account",}}})
In the Google Cloud console, you can view your schedules on the
Schedules page. You can view results from the
completed notebook runs on the
Executions page.
View results
To view notebook run results, you can use the Google Cloud console,
the gcloud CLI, or the Vertex AI Python
client library.
Console
In the Google Cloud console, go to
the Colab Enterprise Executions page.
To run the following code sample, you'll need the Dataform
repository ID of your notebook. To get the repository ID of your notebook,
you can use Dataform's
list_repositories
method.
For more information about deleting Colab Enterprise notebook runs
from the command line, see the gcloud CLI
documentation.
Share a notebook run's results
You can share notebook run results by providing access to the
Cloud Storage bucket that contains your notebook run.
Providing this access also grants users access to any other resources
in the same Cloud Storage bucket (see
Security considerations).
Your notebook run results are stored as notebook (IPYNB) files in
a Cloud Storage bucket. Consider the following when you grant access
to this bucket:
Anyone with access to the bucket can see the notebook file's code and
the results of the notebook run.
Anyone with the ability to change the contents of the bucket can change
the contents of the notebook file.
When your schedule is configured to use personal credentials,
only the specified user is able to modify the schedule or trigger the schedule.
When your schedule is configured to use a service account, only users with the
iam.serviceAccounts.actAs permission on the service account is able to modify
the schedule or trigger the schedule.
View schedule details
You can view information about a schedule, including:
The Cloud Storage bucket that the schedule stores results in.
The start and end time.
The frequency.
To view schedule details, you can use the Google Cloud console or
the gcloud CLI.
Console
In the Google Cloud console, go to
the Colab Enterprise Schedules page.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-06-09 UTC."],[],[]]