Description

Get all cron jobs of the account.

Arguments

token (Required)
You API token. Check authentication section for details.
page (Optional)
The server serves results page by page. This argument defines the page number of which the cron jobs will be got. Default to 1.
size (Optional)
The max number of cron jobs in one page. Default to 10.
sortby (Optional)
The attribute to sort by. Allowed values:
cronId: cron job ID.
name: cron job name.
url: cron job URL.
epdsOccupied: how many EPDs are occupied by the cron job.
failedTime: consecutive failure number.
Default to cronId.
order (Optional)
The order. Allowed values:
desc: descent order.
asc: ascent order.
Default to desc.

Example Request

https://www.easycron.com/rest/list?token=[token]&sortby=cronId&order=desc

In above example, [token] should be replaced with the true token string.

Example Success Response (in JSON format)

{"status":"success","cron_jobs":[{"cron_job_id":"2107","cron_job_name":"Read feeds","user_id":"1","url":"http:\/\/www.domain.com\/readfeeds","cron_expression":"15 1 * * *","number_failed_time":"0","epds_occupied":"2","log_output_length":"10240","email_me":"2","http_method":"GET","http_headers":"","posts":"","via_tor":"0","status":"0","created":"2012-03-19 17:04:18","updated":"2012-08-11 14:25:23"},{"cron_job_id":"1807","cron_job_name":"Backup database","user_id":"1","url":"http:\/\/example.com\/cron\/backupdatabase","cron_expression":"55 23 * * *","number_failed_time":"0","epds_occupied":"2","log_output_length":"0","email_me":"0","http_method":"GET","http_headers":"","posts":"","via_tor":"0","status":"0","created":"2012-01-31 10:07:48","updated":"2012-07-19 05:42:32"},{"cron_job_id":"1604","cron_job_name":"Send newsletters","user_id":"1","url":"http:\/\/www.domain.com\/sendmails","cron_expression":"* * * * *","number_failed_time":"0","epds_occupied":"536","log_output_length":"0","email_me":"0","http_method":"GET","http_headers":"","posts":"","via_tor":"0","status":"0","created":"2011-12-31 20:43:13","updated":"2012-08-11 14:25:55"}]}

Above example response is hard to read, you actually can easily decode it. After decoding it's equal to the following array:

Array
(
    [status] => success
    [cron_jobs] => Array
        (
            [0] => Array
                (
                    [cron_job_id] => 2107
                    [cron_job_name] => Read feeds
                    [user_id] => 1
                    [url] => http://www.domain.com/readfeeds
                    [cron_expression] => 15 1 * * *
                    [number_failed_time] => 0
                    [epds_occupied] => 2
                    [log_output_length] => 10240
                    [email_me] => 2
                    [http_method] => GET
                    [http_headers] =>
                    [posts] =>
                    [via_tor] => 0
                    [status] => 0
                    [created] => 2012-03-19 17:04:18
                    [updated] => 2012-08-11 14:25:23
                )

            [1] => Array
                (
                    [cron_job_id] => 1807
                    [cron_job_name] => Backup database
                    [user_id] => 1
                    [url] => http://example.com/cron/backupdatabase
                    [cron_expression] => 55 23 * * *
                    [number_failed_time] => 0
                    [epds_occupied] => 2
                    [log_output_length] => 0
                    [email_me] => 0
                    [http_method] => GET
                    [http_headers] =>
                    [posts] =>
                    [via_tor] => 0
                    [status] => 0
                    [created] => 2012-01-31 10:07:48
                    [updated] => 2012-07-19 05:42:32
                )

            [2] => Array
                (
                    [cron_job_id] => 1604
                    [cron_job_name] => Send newsletters
                    [user_id] => 1
                    [url] => http://www.domain.com/sendmails
                    [cron_expression] => * * * * *
                    [number_failed_time] => 0
                    [epds_occupied] => 536
                    [log_output_length] => 0
                    [email_me] => 0
                    [http_method] => GET
                    [http_headers] =>
                    [posts] =>
                    [via_tor] => 0
                    [status] => 0
                    [created] => 2011-12-31 20:43:13
                    [updated] => 2012-08-11 14:25:55
                )

        )

)

Example Error Response (in JSON format)

If you use an invalid token, you may receive following error response:

{"status":"error","error":{"code":"1","message":"Wrong API token."}}

The equal readable array is:

Array
(
    [status] => error
    [error] => Array
        (
            [code] => 1
            [message] => Wrong API token.
        )

)

If you make too much API requests in one day, you may receive following error:

code: 26

message: You have exceeded your max daily API request limit.