Manage cron jobs

Pub/Sub target

If you choose the Pub/Sub target type:

  1. Specify the name of the topic to which the job will publish. This is a Pub/Sub topic that you have already set up in your project.

  2. Specify a message to be sent to the topic. This is sent as the data parameter within the Pub/Sub message. For an example that does this, see the Quickstart.

  3. Add any message attributes you need.

  4. Set up any additional configuration using the Configure optional settings section.

Cloud Scheduler will publish messages to this topic as a Google APIs service account.

App Engine HTTP target

If you choose the App Engine HTTP target type, you must use the App Engine app and the region associated with the current project. If you want to use some other App Engine app outside of your current project, choose HTTP as the target, not App Engine HTTP. The target firewall rules must allow requests from the 0.1.0.2/32 IP range.

Set the form as follows:

  1. In the Target type list, select App Engine HTTP.

  2. Specify the name of the App Engine service that is running the handler for the Cloud Scheduler job. If omitted, the default service is assumed. If you want to set it, you can find the service names in the Google Cloud console.

  3. Optionally, specify the version. If left unset, the currently serving version is used. You can find available versions in the Google Cloud console.

  4. Optionally, specify the instance. If left unset, any available instance can be used. You can find available versions in the Google Cloud console.

  5. Specify the relative URL of the App Engine endpoint that the job will contact. If you use the default value /, then the job will use PROJECT-ID.appspot.com where PROJECT-ID is your current project ID.

  6. Set the HTTP method you want to use when the job executes. The default is POST.

  7. Add any headers you need to the request.

  8. Optionally, specify the body data to be sent to the target. This data is sent in the body of the request as bytes when either the POST or PUT HTTP method is selected.

Targeted App Engine endpoints must be in the same project and can be secured with login: admin on the handlers element in the app.yaml file.

HTTP target

If you choose the HTTP target type:

  1. Specify the fully qualified URL of the endpoint the job will contact.

  2. Specify the HTTP method. The default is POST.

  3. Optionally, specify the data to be sent to the target. This data is sent in the body of the request as bytes when either the POST or PUT HTTP method is selected.

  4. Add any headers you need.

  5. To create an HTTP target job that requires authentication, see Use authentication with HTTP targets.

Targeted HTTP endpoints must be publicly accessible.