cron.logs |
Returns logs of a cron with status information, execution time and exact date and time of execution. Optional, the returned header and first 512 chars of the body can be returned as well. Authentication & ActionThis method needs authentication. It can be accessed by http and https. Action type: HTTP GET. Argumentsid (required) The id of one cron. error (not required) Whether to return only error logs or only logs without error. Don't use this parameter if you want all logs (error and no error). Allowed values: 0 = no errors / 1 = only errors status_code (not required) Show only logs with a certain status code (HTML). Allowed values: any status code response (not required) Whether to return received header and body as well. We only store the first 512 chars of a header and the returned body. Allowed values: 0 = do not return or 1 = return header and content Default: 0 from (not required) Date or DateTime string. Shows logs from this date. The format is: yyyymmdd or yyyymmddhhmmss, all attached. We only store cron logs of the last 7 days. Cron uses CET timezone. Default: 24 hours ago until (not required) Date or DateTime string. Shows logs until this date. The format is: yyyymmdd or yyyymmddhhmmss, all attached. Cron uses CET timezone. page (not required) The pagenumber of returned data. Allowed values: any integer perpage (not required) The max. number of logs returned. Allowed values: any integer. The maximum value is 1000.
Example Request Ihttps://api.webcron.org/cron.logs/id:4321/from:20110901000000/
Example Response<rsp status="ok" total="3" page="1" perpage="1000">
<logs cron_id="4321" name="my cron">
<log id="81460075" date="2011-09-01 00:01:02" scheduled="2011-09-01 00:01:00" time_out="30">
<status error="0" status_code="200"/>
<response exec_time="1688"/>
</log>
<log id="81480452" date="2011-09-01 01:21:03" scheduled="2011-09-01 01:21:00" time_out="30">
<status error="1" status_code="500"/>
<response exec_time="600"/>
</log>
<log id="81480452" date="2011-09-01 08:41:03" scheduled="2011-09-01 08:41:00" time_out="30">
<status error="0" status_code="200"/>
<response exec_time="1661"/>
</log>
</logs>
<rsp>
Example Request IIhttps://api.webcron.org/cron.logs/id:4321/from:20110901000000/response:1
Example Response<rsp status="ok" total="3" page="1" perpage="1000">
<logs cron_id="4321" name="my cron">
<log id="81460075" date="2011-09-01 00:01:02" scheduled="2011-09-01 00:01:00" time_out="30">
<status error="0" status_code="200"/>
<response exec_time="1688">
<header>
HTTP/1.1 200 OK
Date: Fri, 31 Aug 2011 23:01:02 GMT
Content-Length: 20
Content-Type: text/html
</header>
<content>
OK - data aggregated
</content>
</response>
</log>
<log id="81480452" date="2011-09-01 01:21:03" scheduled="2011-09-01 01:21:00" time_out="30">
<status error="1" status_code="500"/>
<response exec_time="600">
<header>
HTTP/1.0 500 Internal Server Error
Date: Sun, 01 Sep 2011 00:21:03 GMT
Content-Length: 0
Connection: close
Content-Type: text/html
</header>
<content>
</content>
</response>
</log>
<log id="81480452" date="2011-09-01 08:41:03" scheduled="2011-09-01 08:41:00" time_out="30">
<status error="0" status_code="200"/>
<response exec_time="1661">
<header>
HTTP/1.1 200 OK
Date: Fri, 01 Sep 2011 07:41:03 GMT
Content-Length: 20
Content-Type: text/html
</header>
<content>
OK - data aggregated
</content>
</response>
</log>
</logs>
<rsp>
|