Progress will discontinue Telerik Platform on May 10th, 2018. Learn more

Creating a Scheduled Job

Creating a Scheduled Job

You can create a scheduled job to automatically execute a Cloud Function on predefined intervals.

You can do that either from the Telerik Platform portal or using the Backend Services RESTful API. This article focuses on using the Backend Services RESTful API. For information on using the portal, see Getting Started with Scheduled Jobs.

The following request schedules a Cloud Function to run at 12:45 PM each day from Mar 10 2016 to Mar 10 2018.

Request:
    POST https://api.everlive.com/v1/Metadata/Applications/your-app-id/ScheduledJobs
Headers:
    Content-Type: application/json
    Authorization: Masterkey your-master-key
Body:
    {
        Name: "AggregateNewAccounts",
        CloudFunctionId: "2b2c9540-3b51-11e5-ad6d-5f73c238454d",
        StartDate: "2016-03-10T12:45:00.340Z",
        StartTime: 765, //minutes after 00:00 o'clock
        EndType: 3, //1=no end, 2=number of occurrences, 3=end date
        EndValue: "2018-03-10T09:05:50.340Z",
        Recurrence: {
            Type: 3, // 0=once, 1=minutes, 2=hours, 3=days, 4=weeks, 5=months
            Interval: 1, // how often to execute the job
        }
        IsEnabled: true // true|false
    }
Response:
    Status: 201 Created
    Content-Type: application/json
Body:
    {
        "Result": {
            "Id": "5b7a73c0-1b30-11e5-94ef-cfd3e76e7fd9",
            "CreatedAt": "2015-06-25T12:00:30.469Z"
        }
    }

The payload fields are detailed in Scheduled Code Fields and Values Reference.

See Also

Contact us: +1-888-365-2779
sales@telerik.com
Copyright © 2016-2017, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.