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

Reading Scheduled Jobs

Reading Scheduled Jobs

The read operation returns one or more scheduled job objects. Each object contains all the fields set on creation time (the scheduled job definition) plus additional fields such as state and statistics.

You can find more information about the return fields in Scheduled Code Fields and Values Reference.

These are the RESTful operations that you can use to retrieve metadata about scheduled jobs:

Read All

Use this operation to read information about all your app's scheduled jobs.

Request:
    GET https://api.everlive.com/v1/Metadata/Applications/your-app-id/ScheduledJobs
Headers:
    Content-Type: application/json
    Authorization: Masterkey your-master-key
Response:
    Status: 200 OK
    Content-Type: application/json
Body:
    {
        "Count": 2,
        "Result": [
            {
                "Name": "Promote all users with score over 1500",
                "CloudFunctionId": "8b5f6540-39ef-11e5-8b61-2b1fe230cef6",
                "StartDate": "2015-08-05T11:19:31.924Z",
                "StartTime": 679,
                "EndType": 1,
                "Recurrence": {
                    "Type": 1,
                    "Interval": 5
                },
                "State": 1,
                "IsEnabled": true,
                "Stats": {
                    "ExecutionsCount": 2,
                    "TimeoutCount": 0,
                    "FailedCount": 0
                },
                "LastOccurrence": {
                      "ExecutedFor": 23,
                      "ExecutedAt": "2015-08-05T11:29:31.924Z",
                  },
                "CreatedAt": "2015-08-05T14:15:22.872Z",
                "ModifiedAt": "2015-08-05T14:15:22.872Z",
                "Id": "690755a0-3b7c-11e5-a63c-81ed0a12305c"
            },
            {
                "Name": "Add 100 coins to all challenge competitors",
                "CloudFunctionId": "3b5f6000-39re-12e5-7b63-d31fe230cehe",
                "StartDate": "2015-09-01T00:30:00.000Z",
                "StartTime": 30,
                "EndType": 1,
                "Recurrence": {
                    "Type": 5,
                    "Interval": 1,
                    "Day": 1
                },
                "State": 1,
                "IsEnabled": true,
                "Stats": {
                    "ExecutionsCount": 3,
                    "TimeoutsCount": 0,
                    "FailsCount": 0
                },
                "LastOccurrence": {
                      "ExecutedFor": 23,
                      "ExecutedAt": "2015-10-01T00:30:00.000Z",
                  },
                "CreatedAt": "2015-08-05T15:21:13.255Z",
                "ModifiedAt": "2015-08-05T15:21:13.255Z",
                "Id": "9ba3ca80-3b85-11e5-bf8a-032596e26d5b"
            }
        ]
    }

Read by ID

Use this operation to read a single scheduled job by its ID.

Request:
    GET https://api.everlive.com/v1/Metadata/Applications/your-app-id/ScheduledJobs/scheduled-job-id-here
Headers:
    Content-Type: application/json
    Authorization: Masterkey your-master-key-here
Response:
    Status: 200 OK
    Content-Type: application/json
Body:
{
  "Result": {
        "Name": "Promote all users with score over 1500",
        "CloudFunctionId": "8b5f6540-39ef-11e5-8b61-2b1fe230cef6",
        "StartDate": "2015-08-05T11:19:31.924Z",
        "StartTime": 679,
        "EndType": 1,
        "Recurrence": {
            "Type": 1,
            "Interval": 5
        },
        "State": 1,
        "IsEnabled": true,
        "Stats": {
            "ExecutionsCount": 2,
            "TimeoutCount": 0,
            "FailedCount": 0
        },
        "LastOccurrence": {
              "ExecutedFor": 23,
              "ExecutedAt": "2015-08-05T11:29:31.924Z",
          },
        "CreatedAt": "2015-08-05T14:15:22.872Z",
        "ModifiedAt": "2015-08-05T14:15:22.872Z",
        "Id": "690755a0-3b7c-11e5-a63c-81ed0a12305c"
  }
}

Read by Filter

Use this operation to return a subset of scheduled jobs that match the specified filtering criteria.

The example below only matches objects where the ExecutionsCount field in the Stats object is greater than 1000:

Request:
    GET https://api.everlive.com/v1/Metadata/Applications/your-app-id/Procedures
Headers:
    Content-Type: application/json
    Authorization: Masterkey your-master-key-here
    X-Everlive-Filter: {"Stats.ExecutionsCount": {"$gte": 1000}}
Response:
    Status: 200 OK
    Content-Type: application/json
Body:
{
    "Count": 3,
    "Result": [{
        // omitted for brevity
    }]
}

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.