API Documentation

HTTP Basic authentication · XML responses · REST

Sign in to view your API credentials and test the endpoints directly from this page.

Log in

Authentication

All requests use HTTP Basic authentication (RFC 7617). Pass your API login and password in the Authorization header.

curl -u "API_IDENTIFIER:API_SECRET_KEY" \
     https://dev.webcron.org/cron.get

Endpoints

GET /time — Check connection

Verifies that credentials are valid and the service is available.

Response

<?xml version="1.0"?>
<rsp status="ok" timestamp="1745234567"/>
GET /cron.get — List cronjobs

Returns your cronjobs with pagination.

Parameters

Name Type Default Description
page int 1 Page number
perpage int 100 Results per page (max 100)

Response

<?xml version="1.0"?>
<rsp status="ok" total="3">
  <cron id="42" name="My job" url="https://example.com/run"
        status="1" time_out="30" one_off="0">
    <time minute="*/5" hour="*" day="*" weekday="*" month="*"/>
  </cron>
</rsp>
POST /cron.add — Create a cronjob

Creates a new cronjob.

Parameters

Name Type Default Description
name * string Cronjob name
url * string URL to call
minute string * Cron expression — minute
hour string * Cron expression — hour
day string * Cron expression — day of month
weekday string * Cron expression — day of week (0-6)
month string * Cron expression — month
time_out int 30 Timeout in seconds (30, 180, 600, 1800, 3600)

Response

<?xml version="1.0"?>
<rsp status="ok" id="43"/>
POST /cron.edit — Update a cronjob

Updates the provided fields of an existing cronjob.

Parameters

Name Type Default Description
id * int Cronjob ID
name string New name
url string New URL
status int Enable (1) or disable (0)
minute,hour,day,weekday,month string Schedule fields

Response

<?xml version="1.0"?>
<rsp status="ok"/>
POST /cron.delete — Delete a cronjob

Permanently deletes a cronjob.

Parameters

Name Type Default Description
id * int Cronjob ID

Response

<?xml version="1.0"?>
<rsp status="ok"/>
POST /cron.state — Enable / Disable

Toggles the active state of a cronjob.

Parameters

Name Type Default Description
id * int Cronjob ID
status * int 1 = active, 0 = inactive

Response

<?xml version="1.0"?>
<rsp status="ok"/>
GET /cron.logs — Execution history

Returns the latest executions of a cronjob.

Parameters

Name Type Default Description
id * int Cronjob ID
perpage int 50 Number of log entries to return

Response

<?xml version="1.0"?>
<rsp status="ok">
  <logs>
    <log date="2026-04-21 10:00:00" http_code="200" total_time="0.342"/>
    <log date="2026-04-21 09:00:00" http_code="200" total_time="0.298"/>
  </logs>
</rsp>

Error responses

On error, the HTTP status is 4xx and the XML body contains the detail.

<?xml version="1.0"?>
<rsp status="error" error="Cron not found"/>