Setting up your environment

Use the following instructions to set up Cloud Scheduler. You may already have some of these tools installed.

Install and configure the gcloud CLI:

  1. Install and initialize the gcloud CLI

  2. Add the gcloud components for products:

    gcloud components install
    
  3. Update all components:

    gcloud components update
    

Use gcloud to create a project

Or you can use an existing project, if you have one.

  1. Open a terminal on the machine where you installed the gcloud CLI and create a Cloud project:

    gcloud projects create PROJECT_ID
    

    where PROJECT_ID is the ID for the project you want to create. Project IDs must start with a lowercase letter and can have lowercase ASCII letters, digits or hyphens. They must be between 6 and 30 characters.

  2. Configure gcloud to use the project you have chosen:

    gcloud config set project PROJECT_ID
    

    where PROJECT_ID is the ID you set previously.

Use gcloud to create an App Engine app, when appropriate

If you are going to use an App Engine HTTP target, your project must have an App Engine app. This app serves as both the location of the Cloud Scheduler service and of the handler itself. If you wish to have an App Engine handler that is not in your project, you should select an HTTP target instead. In this case you do not need an App Engine app in your project.

  1. To create the app:

    gcloud app create [--region=REGION]
    

    where REGION is the location in which the app runs. Note that two locations, called europe-west and us-central in App Engine commands, are called, respectively, europe-west1 and us-central1 in Cloud Scheduler commands.

    You can check the region of an existing app with the command:

    gcloud app describe
    

    The region is listed by locationId. Your location, for example, might be shown as locationId: us-central.

    Once you set a region for the App Engine app, you cannot change it.

Use the Google Cloud console to enable features:

  1. Enable billing for your project

  2. Enable the Cloud Scheduler API

Your project now supports Cloud Scheduler.