Get cron jobs of the account.
token (Required)group_id (Optional)0, means getting the cron jobs that belong to no group.page (Optional)size (Optional)sortby (Optional)cronId: cron job ID.name: cron job name.url: cron job URL.epdsOccupied: how many EPDs are occupied by the cron job.totalSuccesses: total number of successful cron job executions.totalFailures: total number of failed cron job executions.failedTime: consecutive failure number.cronId.order (Optional)desc: descent order.asc: ascent order.desc.https://www.easycron.com/rest/list?token=[token]&sortby=cronId&order=desc
In above example, [token] should be replaced with the true token string.
{"status":"success","cron_jobs":[{"cron_job_id":"2107","cron_job_name":"Read feeds","description":"Triggers the script to read feeds.","user_id":"1","url":"http:\/\/www.domain.com\/readfeeds","auth_user":"user123","auth_pw":"pw123","cron_expression":"15 1 * * * *","total_successes":"0","total_failures":"0","number_failed_time":"0","epds_occupied":"2","email_me":"1","sensitivity":"1","send_slack":"1","slack_sensitivity":"1","slack_url":"https://hooks.slack.com/services/xxx","group_id":"74","http_method":"GET","http_headers":"","http_message_body":"","custom_timeout":"30","criterion":"2","success_regexp":"succeeded","failure_regexp":"","wh":"0","wh_url":"","wh_http_method":"GET","wh_data":[""],"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","description":"Triggers the script to backup database.","user_id":"1","url":"http:\/\/example.com\/cron\/backupdatabase","auth_user":"user123","auth_pw":"pw123","cron_expression":"55 23 * * * *","total_successes":"0","total_failures":"0","number_failed_time":"0","epds_occupied":"2","email_me":"0","sensitivity":"1","send_slack":"1","slack_sensitivity":"1","slack_url":"https://hooks.slack.com/services/xxx","group_id":"74","http_method":"GET","http_headers":"","http_message_body":"","custom_timeout":"30","criterion":"2","success_regexp":"succeeded","failure_regexp":"","wh":"1","wh_url":"http://example.com/hook.php","wh_http_method":"POST","wh_data":["CRON_JOB_ID","CRON_JOB_NAME"],"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","description":"Triggers the script to send newsletters.","user_id":"1","url":"http:\/\/www.domain.com\/sendmails","auth_user":"user123","auth_pw":"pw123","cron_expression":"* * * * * *","total_successes":"0","total_failures":"0","number_failed_time":"0","epds_occupied":"536","email_me":"0","sensitivity":"1","send_slack":"1","slack_sensitivity":"1","slack_url":"https://hooks.slack.com/services/xxx","group_id":"74","http_method":"GET","http_headers":"","http_message_body":"","custom_timeout":"30","criterion":"2","success_regexp":"succeeded","failure_regexp":"","wh":"1","wh_url":"http://example.com/hook.php","wh_http_method":"POST","wh_data":["CRON_JOB_ID","CRON_JOB_NAME"],"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
[description] => Triggers the script to read feeds.
[user_id] => 1
[url] => http://www.domain.com/readfeeds
[auth_user] => user123
[auth_pw] => pw123
[cron_expression] => 15 1 * * * *
[total_successes] => 0
[total_failures] => 0
[number_failed_time] => 0
[epds_occupied] => 2
[email_me] => 1
[sensitivity] => 1
[send_slack] => 1
[slack_sensitivity] => 1
[slack_url] => https://hooks.slack.com/services/xxx
[group_id] => 0
[http_method] => GET
[http_headers] =>
[http_message_body] =>
[custom_timeout] => 30
[criterion] => 2
[success_regexp] => succeeded
[failure_regexp] =>
[wh] => 0
[wh_url] =>
[wh_http_method] => GET
[wh_data] =>
[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
[description] => Triggers the script to backup database.
[user_id] => 1
[url] => http://example.com/cron/backupdatabase
[auth_user] => user123
[auth_pw] => pw123
[cron_expression] => 55 23 * * * *
[total_successes] => 0
[total_failures] => 0
[number_failed_time] => 0
[epds_occupied] => 2
[email_me] => 0
[sensitivity] => 1
[send_slack] => 1
[slack_sensitivity] => 1
[slack_url] => https://hooks.slack.com/services/xxx
[group_id] => 74
[http_method] => GET
[http_headers] =>
[http_message_body] =>
[custom_timeout] => 30
[criterion] => 2
[success_regexp] => succeeded
[failure_regexp] =>
[wh] => 1
[wh_url] => http://example.com/hook.php
[wh_http_method] => POST
[wh_data] => Array(CRON_JOB_ID, CRON_JOB_NAME)
[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
[description] => Triggers the script to send newsletters.
[user_id] => 1
[url] => http://www.domain.com/sendmails
[auth_user] => user123
[auth_pw] => pw123
[cron_expression] => * * * * * *
[total_successes] => 0
[total_failures] => 0
[number_failed_time] => 0
[epds_occupied] => 536
[email_me] => 0
[sensitivity] => 1
[send_slack] => 1
[slack_sensitivity] => 1
[slack_url] => https://hooks.slack.com/services/xxx
[group_id] => 74
[http_method] => GET
[http_headers] =>
[http_message_body] =>
[custom_timeout] => 30
[criterion] => 2
[success_regexp] => succeeded
[failure_regexp] =>
[wh] => 1
[wh_url] => http://example.com/hook.php
[wh_http_method] => POST
[wh_data] => Array(CRON_JOB_ID, CRON_JOB_NAME)
[status] => 0
[created] => 2011-12-31 20:43:13
[updated] => 2012-08-11 14:25:55
)
)
)
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.