LATEST VERSION: 1.1 - CHANGELOG
Scheduler for PCF v1.1

Using Scheduler for PCF

This topic provides instructions for using Scheduler for Pivotal Cloud Foundry (PCF).

You can interact with the service through the Cloud Foundry Command Line Interface (cf CLI) or the Scheduler HTTP API to configure jobs and outbound HTTP calls and to review history. For general information, see Managing Service Instances with the cf CLI.

Prerequisites

To start using Scheduler for PCF, you need the following:

  • A PCF installation with Scheduler for PCF installed and listed in the Marketplace
  • A Space Developer account
  • (Optional) The cf CLI v6.23.0 or greater and the Scheduler for PCF CLI plugin installed on your local machine. The Scheduler for PCF CLI plugin is packaged with the Scheduler for PCF tile on Pivotal Network.

Create and Bind a Service Instance

Every app and service in PCF is scoped to a space. This means that an app can use a service only if an instance of the service exists in the same space.

The Scheduler for PCF service is a singleton service. Only one service instance can be created in a space.

Confirm Service Availability

For apps to use a service, the service must be available in the Marketplace. To confirm the availability of Scheduler for PCF, perform the following steps:

  1. Run cf marketplace from the command line.
  2. If the output lists scheduler-for-pcf in the service column, Scheduler for PCF is available. If the service is not available, install it. See Installing and Configuring Scheduler for PCF for more information.

    $ cf marketplace
    Getting services from marketplace in org my-org / space my-space as user@example.com...
    OK
    service             plans      description
    [...]
    scheduler-for-pcf   standard   Scheduler service
    [...]
    

Create a Service Instance

To create an instance of the Scheduler for PCF service, run cf create-service scheduler-for-pcf standard SERVICE-INSTANCE-NAME, replacing SERVICE-INSTANCE-NAME with a name of your choice. After you create the service instance, this instance name appears under name in the output of the cf services command.

See the following example:

$ cf create-service scheduler-for-pcf standard my-instance
Creating service my-instance in org my-org / space my-space as user@example.com... OK
$ cf services
Getting services in org my-org / space my-space as user@example.com... OK name service plan bound apps last operation my-instance scheduler-for-pcf standard create succeeded

You can create only one instance in a space. If you attempt to create more than one instance in a space, you receive an error response.

Bind a Service Instance to Your App

For an app to use a service, you must bind it to a service instance. Do this after you push or re-push the app using cf push.

To bind an app to a Scheduler for PCF instance, run cf bind-service APP-NAME SERVICE-INSTANCE-NAME, replacing APP-NAME with the name of the app you want to use the Scheduler for PCF service for and SERVICE-INSTANCE-NAME with the name you provided when you ran cf create-service.

$ cf bind-service my-app my-instance
Binding service my-instance to my-app in org my-org / space my-space as user@example.com... OK TIP: Use 'cf push' to ensure your env variable changes take effect

Manage Jobs

See Using Jobs to learn about the operations that you can perform with Scheduler for PCF.

Manage Calls

See Using Calls to learn about the operations that you can perform with Scheduler for PCF.

Create a pull request or raise an issue on the source for this page in GitHub