Stay organized with collections
Save and categorize content based on your preferences.
Before scheduling and running a cron job, you must set up your Google Cloud
project and environment for Cloud Scheduler.
Enable the Cloud Scheduler API
Use the following instructions to create or select a Google Cloud project
and to enable the Cloud Scheduler API.
Console
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.
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.
If you are going to use an App Engine HTTP target, you must add an
App Engine application
to your project. This app serves as both the location of the Cloud Scheduler
service and of the job handler itself, which performs the work associated with
a Cloud Scheduler job, and returns an acknowledgement in response.
If you want to have an App Engine job handler that is not in your
project, you should select an HTTP target instead. In this case, you don't need
an App Engine app in your project.
Console
In the Google Cloud console, go to the App Engine page.
In the Welcome to App Engine dialog, do one of the
following:
If you have already created an App Engine application and there
is a Your App Engine application has been created message displayed,
you can then skip the remaining steps in this section.
or
If you haven't created an App Engine application yet, then click
Create application and continue with the remaining steps in this
section.
Replace REGION with the
location in which the app runs. Note that
europe-west and us-central are called, respectively, europe-west1
and us-central1 in Cloud Scheduler commands.
After you set a region for the App Engine app, you can't change
it.
You can check the region of an existing app with the following command:
gcloudappdescribe
The locationId indicates the region. For example:
locationId: us-central.
[[["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 2025-09-03 UTC."],[],[],null,["# Set up your environment\n\nBefore scheduling and running a cron job, you must set up your Google Cloud\nproject and environment for Cloud Scheduler.\n\nEnable the Cloud Scheduler API\n------------------------------\n\nUse the following instructions to create or select a Google Cloud project\nand to enable the Cloud Scheduler API. \n\n### Console\n\n\n- Sign in to your Google Cloud account. If you're new to Google Cloud, [create an account](https://console.cloud.google.com/freetrial) to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Cloud Scheduler API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=cloudscheduler.googleapis.com)\n\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Cloud Scheduler API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=cloudscheduler.googleapis.com)\n\n\u003cbr /\u003e\n\n### gcloud\n\n\n- Sign in to your Google Cloud account. If you're new to Google Cloud, [create an account](https://console.cloud.google.com/freetrial) to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Cloud Scheduler API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=cloudscheduler.googleapis.com)\n\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Cloud Scheduler API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=cloudscheduler.googleapis.com)\n\n\u003cbr /\u003e\n\nSet up authentication\n---------------------\n\nHow you authenticate to Cloud Scheduler depends on the interface you\nuse to access the API and the environment where your code is running.\n\nFor more information, see\n[Authenticate to Cloud Scheduler](/scheduler/docs/authentication) and\n[Use authentication with HTTP targets](/scheduler/docs/http-target-auth).\n\nAdd an App Engine application\n-----------------------------\n\nIf you are going to use an App Engine HTTP target, you must add an\n[App Engine application](/appengine/docs/standard/managing-projects-apps-billing)\nto your project. This app serves as both the location of the Cloud Scheduler\nservice and of the job handler itself, which performs the work associated with\na Cloud Scheduler job, and returns an acknowledgement in response.\n\nIf you want to have an App Engine job handler that is **not** in your\nproject, you should select an HTTP target instead. In this case, you don't need\nan App Engine app in your project. \n\n### Console\n\n1. In the Google Cloud console, go to the **App Engine** page.\n\n\n [Go to App Engine](https://console.cloud.google.com/appengine/start)\n\n \u003cbr /\u003e\n\n2. In the **Welcome to App Engine** dialog, do one of the\n following:\n\n - If you have already created an App Engine application and there\n is a **Your App Engine application has been created** message displayed,\n you can then skip the remaining steps in this section.\n\n or\n\n \u003cbr /\u003e\n\n - If you haven't created an App Engine application yet, then click\n **Create application** and continue with the remaining steps in this\n section.\n\n3. Select a [region](/appengine/docs/locations) for your\n application.\n\n Note that `europe-west` and `us-central` are called, respectively,\n `europe-west1` and `us-central1` in Cloud Scheduler commands.\n\n After you set a region for the App Engine app, **you can't change\n it**.\n4. Don't select a service account; the default App Engine service\n account is used.\n\n5. Click **Next**.\n\n The application is configured and created. This can take a couple of\n minutes.\n6. Don't download the Cloud SDK; instead, click **I'll do this later**.\n\n You should see a **Your App Engine application has been created** message.\n\n### gcloud\n\n1. To create an App Engine app, run the\n [`gcloud app create`](/sdk/gcloud/reference/app/create) command:\n\n gcloud app create --region=\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e\n\n Replace \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e with the\n [location](/appengine/docs/locations) in which the app runs. Note that\n `europe-west` and `us-central` are called, respectively, `europe-west1`\n and `us-central1` in Cloud Scheduler commands.\n\n After you set a region for the App Engine app, **you can't change\n it**.\n2. You can check the region of an existing app with the following command:\n\n gcloud app describe\n\n The `locationId` indicates the region. For example:\n `locationId: us-central`."]]