−50%

50% off your first month on any paid plan · code WELCOME50 · until Nov 30

Start free →

Cloud Cron

Cloud Cron Jobs

Cloud Cron jobs let you run HTTP requests on a schedule without managing a server. WatchCron handles the scheduling, execution, retries, and monitoring. Use the API to create, manage, and inspect Cloud Cron jobs programmatically.

List Cloud Cron jobs

GET /api/v1/cloud-crons

Returns a paginated list of all Cloud Cron jobs in the project associated with your API key.

Query parameters

ParameterTypeDefaultDescription
statusstring—Filter by status (active, paused, failing)
per_pageinteger25Results per page
pageinteger1Page number
curl -H "Authorization: Bearer YOUR_API_KEY" \
     "https://watchcron.com/api/v1/cloud-crons?status=active&per_page=10"
$response = Http::withToken('YOUR_API_KEY')
    ->get('https://watchcron.com/api/v1/cloud-crons', [
        'status'   => 'active',
        'per_page' => 10,
    ]);

$jobs = $response->json('data');
import requests

response = requests.get(
    "https://watchcron.com/api/v1/cloud-crons",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    params={"status": "active", "per_page": 10},
)

jobs = response.json()["data"]
const response = await fetch(
  "https://watchcron.com/api/v1/cloud-crons?status=active&per_page=10",
  { headers: { "Authorization": "Bearer YOUR_API_KEY" } }
);

const { data: jobs } = await response.json();
req, _ := http.NewRequest("GET",
    "https://watchcron.com/api/v1/cloud-crons?status=active&per_page=10", nil)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")

resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()

Response 200 OK

JSON
{
  "data": [
    {
      "uuid": "c3d4e5f6-a7b8-9012-cdef-123456789012",
      "name": "WordPress Cron Trigger",
      "url": "https://example.com/wp-cron.php",
      "method": "GET",
      "status": "active",
      "cron_expression": "*/5 * * * *",
      "timezone": "UTC",
      "timeout_seconds": 30,
      "max_retries": 0,
      "success_codes": null,
      "success_keyword": null,
      "prevent_overlap": false,
      "is_running": false,
      "is_active": true,
      "consecutive_failures": 0,
      "last_executed_at": "2026-10-26T12:05:00Z",
      "next_execution_at": "2026-10-26T12:10:00Z",
      "last_response_time_ms": 245,
      "last_status_code": 200,
      "last_error": null,
      "maintenance_windows": null,
      "created_at": "2026-10-01T08:00:00Z",
      "updated_at": "2026-10-26T12:05:00Z"
    }
  ],
  "meta": {
    "pagination": {
      "total": 12,
      "per_page": 10,
      "current_page": 1,
      "last_page": 2
    }
  }
}

Cloud Cron object

Every Cloud Cron response includes these fields:

FieldTypeDescription
uuidstringUnique identifier (UUID v4). Used in all API URLs.
namestringDisplay name of the job
urlstringTarget URL that will be requested on each execution
methodstringHTTP method: GET, POST, PUT, PATCH, DELETE, or HEAD
statusstringCurrent status: active, paused, or failing
cron_expressionstringStandard 5-field cron expression defining the schedule
timezonestringIANA timezone for schedule evaluation (e.g. Europe/Berlin)
timeout_secondsintegerMaximum time in seconds to wait for a response (1–300)
max_retriesintegerNumber of retry attempts on failure (0–5)
success_codesarray|nullList of HTTP status codes considered successful. If null, any 2xx is accepted.
success_keywordstring|nullString that must appear (or be absent) in the response body for success
prevent_overlapbooleanIf true, skips execution when the previous run is still in progress
is_runningbooleanWhether the job is currently executing
is_activebooleanWhether the job is active (not paused)
consecutive_failuresintegerNumber of consecutive failed executions
last_executed_atstring|nullISO 8601 timestamp of the most recent execution
next_execution_atstring|nullISO 8601 timestamp of the next scheduled execution
last_response_time_msinteger|nullResponse time in milliseconds of the last execution
last_status_codeinteger|nullHTTP status code returned by the last execution
last_errorstring|nullError message from the last failed execution
maintenance_windowsarray|nullScheduled maintenance windows during which execution is skipped
created_atstringISO 8601 timestamp
updated_atstringISO 8601 timestamp

Status values

StatusMeaning
activeJob is running on schedule — last execution succeeded
pausedJob is paused — no executions or alerts will fire
failingLast execution failed — alert triggered

Create a Cloud Cron job

POST /api/v1/cloud-crons

Request body

FieldTypeRequiredDescription
namestringYesJob name (max 255 characters)
urlstringYesTarget URL (max 2048 characters)
methodstringNoGET, POST, PUT, PATCH, DELETE, or HEAD (default: GET)
headersarrayNoCustom HTTP headers as key-value pairs
bodystringNoRequest body (for POST/PUT/PATCH methods)
http_auth_userstringNoHTTP Basic Auth username (max 255 characters)
http_auth_passstringNoHTTP Basic Auth password (max 255 characters)
cron_expressionstringYesStandard 5-field cron expression (max 100 characters)
timezonestringNoIANA timezone (max 64 characters, defaults to app timezone)
timeout_secondsintegerNoRequest timeout in seconds, 1–300 (default: 30)
max_retriesintegerNoRetry attempts on failure, 0–5 (default: 0)
success_codesarrayNoList of HTTP status codes (100–599) considered successful
success_keywordstringNoString to match in the response body (max 255 characters)
success_keyword_absentbooleanNoIf true, the keyword must be absent for success
prevent_overlapbooleanNoSkip execution if the previous run is still in progress
maintenance_windowsarrayNoMaintenance windows during which execution is skipped
Cron expressions: Use standard 5-field format. For example, */5 * * * * runs every 5 minutes, 0 2 * * * runs daily at 2 AM. Ranges, lists, and steps are supported.

Example: schedule a WordPress cron trigger

curl -X POST https://watchcron.com/api/v1/cloud-crons \
     -H "Authorization: Bearer YOUR_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{
       "name": "WordPress Cron Trigger",
       "url": "https://example.com/wp-cron.php",
       "method": "GET",
       "cron_expression": "*/5 * * * *",
       "timezone": "UTC",
       "timeout_seconds": 30,
       "max_retries": 2
     }'
$response = Http::withToken('YOUR_API_KEY')
    ->post('https://watchcron.com/api/v1/cloud-crons', [
        'name'            => 'WordPress Cron Trigger',
        'url'             => 'https://example.com/wp-cron.php',
        'method'          => 'GET',
        'cron_expression' => '*/5 * * * *',
        'timezone'        => 'UTC',
        'timeout_seconds' => 30,
        'max_retries'     => 2,
    ]);

$job = $response->json('data');
echo "Next run: " . $job['next_execution_at'];
import requests

response = requests.post(
    "https://watchcron.com/api/v1/cloud-crons",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "name": "WordPress Cron Trigger",
        "url": "https://example.com/wp-cron.php",
        "method": "GET",
        "cron_expression": "*/5 * * * *",
        "timezone": "UTC",
        "timeout_seconds": 30,
        "max_retries": 2,
    },
)

job = response.json()["data"]
print(f"Next run: {job['next_execution_at']}")
const response = await fetch("https://watchcron.com/api/v1/cloud-crons", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    name: "WordPress Cron Trigger",
    url: "https://example.com/wp-cron.php",
    method: "GET",
    cron_expression: "*/5 * * * *",
    timezone: "UTC",
    timeout_seconds: 30,
    max_retries: 2,
  }),
});

const { data: job } = await response.json();
console.log(`Next run: ${job.next_execution_at}`);
body := strings.NewReader(`{
  "name": "WordPress Cron Trigger",
  "url": "https://example.com/wp-cron.php",
  "method": "GET",
  "cron_expression": "*/5 * * * *",
  "timezone": "UTC",
  "timeout_seconds": 30,
  "max_retries": 2
}`)

req, _ := http.NewRequest("POST", "https://watchcron.com/api/v1/cloud-crons", body)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")

resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()

Response 201 Created

JSON
{
  "data": {
    "uuid": "c3d4e5f6-a7b8-9012-cdef-123456789012",
    "name": "WordPress Cron Trigger",
    "url": "https://example.com/wp-cron.php",
    "method": "GET",
    "status": "active",
    "cron_expression": "*/5 * * * *",
    "timezone": "UTC",
    "timeout_seconds": 30,
    "max_retries": 2,
    "success_codes": null,
    "success_keyword": null,
    "prevent_overlap": false,
    "is_running": false,
    "is_active": true,
    "consecutive_failures": 0,
    "last_executed_at": null,
    "next_execution_at": "2026-10-26T12:10:00Z",
    "last_response_time_ms": null,
    "last_status_code": null,
    "last_error": null,
    "maintenance_windows": null,
    "created_at": "2026-10-26T12:06:00Z",
    "updated_at": "2026-10-26T12:06:00Z"
  }
}

Validation errors

If the request body is invalid, the API returns 422:

422 response
{
  "error": "The url field is required."
}

Get a Cloud Cron job

GET /api/v1/cloud-crons/{uuid}

Returns full details for a single Cloud Cron job.

curl -H "Authorization: Bearer YOUR_API_KEY" \
     "https://watchcron.com/api/v1/cloud-crons/c3d4e5f6-a7b8-9012-cdef-123456789012"
$uuid = 'c3d4e5f6-a7b8-9012-cdef-123456789012';

$response = Http::withToken('YOUR_API_KEY')
    ->get("https://watchcron.com/api/v1/cloud-crons/{$uuid}");

$job = $response->json('data');
uuid = "c3d4e5f6-a7b8-9012-cdef-123456789012"

response = requests.get(
    f"https://watchcron.com/api/v1/cloud-crons/{uuid}",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)

job = response.json()["data"]
const uuid = "c3d4e5f6-a7b8-9012-cdef-123456789012";

const response = await fetch(
  `https://watchcron.com/api/v1/cloud-crons/${uuid}`,
  { headers: { "Authorization": "Bearer YOUR_API_KEY" } }
);

const { data: job } = await response.json();

Returns the same Cloud Cron object as shown in Cloud Cron object. Returns 404 if the UUID does not exist or belongs to a different project.

Update a Cloud Cron job

PUT /api/v1/cloud-crons/{uuid}

Updates one or more fields on an existing Cloud Cron job. Only include the fields you want to change — all fields are optional.

Request body

FieldTypeDescription
namestringJob name (max 255 characters)
urlstringTarget URL (max 2048 characters)
methodstringGET, POST, PUT, PATCH, DELETE, or HEAD
headersarray|nullCustom HTTP headers (replaces existing headers)
bodystring|nullRequest body
http_auth_userstring|nullHTTP Basic Auth username
http_auth_passstring|nullHTTP Basic Auth password
cron_expressionstringCron expression (max 100 characters)
timezonestring|nullIANA timezone
timeout_secondsintegerRequest timeout, 1–300 seconds
max_retriesintegerRetry attempts, 0–5
success_codesarray|nullAccepted HTTP status codes (send null to reset to any 2xx)
success_keywordstring|nullResponse body keyword match
success_keyword_absentbooleanInvert keyword matching
prevent_overlapbooleanSkip execution during active run
maintenance_windowsarray|nullMaintenance windows (replaces existing)
curl -X PUT https://watchcron.com/api/v1/cloud-crons/c3d4e5f6-a7b8-9012-cdef-123456789012 \
     -H "Authorization: Bearer YOUR_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{
       "cron_expression": "*/10 * * * *",
       "timeout_seconds": 60,
       "max_retries": 3
     }'
$response = Http::withToken('YOUR_API_KEY')
    ->put("https://watchcron.com/api/v1/cloud-crons/{$uuid}", [
        'cron_expression' => '*/10 * * * *',
        'timeout_seconds' => 60,
        'max_retries'     => 3,
    ]);
response = requests.put(
    f"https://watchcron.com/api/v1/cloud-crons/{uuid}",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "cron_expression": "*/10 * * * *",
        "timeout_seconds": 60,
        "max_retries": 3,
    },
)
const response = await fetch(`https://watchcron.com/api/v1/cloud-crons/${uuid}`, {
  method: "PUT",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    cron_expression: "*/10 * * * *",
    timeout_seconds: 60,
    max_retries: 3,
  }),
});

Returns 200 OK with the updated Cloud Cron object.

Note on headers: Sending "headers": {"X-Custom": "value"} replaces all existing custom headers. Send "headers": null to clear them.

Delete a Cloud Cron job

DELETE /api/v1/cloud-crons/{uuid}

Permanently deletes a Cloud Cron job and all its execution logs.

curl -X DELETE \
     -H "Authorization: Bearer YOUR_API_KEY" \
     "https://watchcron.com/api/v1/cloud-crons/c3d4e5f6-a7b8-9012-cdef-123456789012"
$response = Http::withToken('YOUR_API_KEY')
    ->delete("https://watchcron.com/api/v1/cloud-crons/{$uuid}");
response = requests.delete(
    f"https://watchcron.com/api/v1/cloud-crons/{uuid}",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)
const response = await fetch(
  `https://watchcron.com/api/v1/cloud-crons/${uuid}`,
  {
    method: "DELETE",
    headers: { "Authorization": "Bearer YOUR_API_KEY" },
  }
);

Returns 204 No Content on success. This action is irreversible.

Pause or unpause a Cloud Cron job

PATCH /api/v1/cloud-crons/{uuid}/pause

Pauses or unpauses a Cloud Cron job. Paused jobs will not execute on their schedule and will not trigger alerts.

Request body

FieldTypeRequiredDescription
pausedbooleanYestrue to pause, false to unpause
curl -X PATCH https://watchcron.com/api/v1/cloud-crons/c3d4e5f6-a7b8-9012-cdef-123456789012/pause \
     -H "Authorization: Bearer YOUR_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{"paused": true}'
$response = Http::withToken('YOUR_API_KEY')
    ->patch("https://watchcron.com/api/v1/cloud-crons/{$uuid}/pause", [
        'paused' => true,
    ]);
response = requests.patch(
    f"https://watchcron.com/api/v1/cloud-crons/{uuid}/pause",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={"paused": True},
)
const response = await fetch(
  `https://watchcron.com/api/v1/cloud-crons/${uuid}/pause`,
  {
    method: "PATCH",
    headers: {
      "Authorization": "Bearer YOUR_API_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ paused: true }),
  }
);

Returns 200 OK with the updated Cloud Cron object. The status field will change to paused when paused and back to active when unpaused.

List execution logs

GET /api/v1/cloud-crons/{uuid}/logs

Returns a paginated list of execution logs for a Cloud Cron job, ordered by most recent first.

Query parameters

ParameterTypeDefaultDescription
per_pageinteger25Results per page
pageinteger1Page number
curl -H "Authorization: Bearer YOUR_API_KEY" \
     "https://watchcron.com/api/v1/cloud-crons/c3d4e5f6-a7b8-9012-cdef-123456789012/logs?per_page=10"
$response = Http::withToken('YOUR_API_KEY')
    ->get("https://watchcron.com/api/v1/cloud-crons/{$uuid}/logs", [
        'per_page' => 10,
    ]);

$logs = $response->json('data');
response = requests.get(
    f"https://watchcron.com/api/v1/cloud-crons/{uuid}/logs",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    params={"per_page": 10},
)

logs = response.json()["data"]
const response = await fetch(
  `https://watchcron.com/api/v1/cloud-crons/${uuid}/logs?per_page=10`,
  { headers: { "Authorization": "Bearer YOUR_API_KEY" } }
);

const { data: logs } = await response.json();

Response 200 OK

JSON
{
  "data": [
    {
      "status": "success",
      "status_code": 200,
      "response_time_ms": 245,
      "error": null,
      "response_body": "",
      "attempt": 1,
      "executed_at": "2026-10-26T12:05:00Z"
    },
    {
      "status": "failed",
      "status_code": 503,
      "response_time_ms": 5012,
      "error": "Service Unavailable",
      "response_body": "Maintenance in progress",
      "attempt": 3,
      "executed_at": "2026-10-26T12:00:00Z"
    }
  ],
  "meta": {
    "pagination": {
      "total": 1440,
      "per_page": 10,
      "current_page": 1,
      "last_page": 144
    }
  }
}

Log entry fields

FieldTypeDescription
statusstringExecution result: success or failed
status_codeinteger|nullHTTP status code returned by the target URL (null if the request timed out or DNS failed)
response_time_msintegerTotal response time in milliseconds
errorstring|nullError message if the execution failed
response_bodystring|nullCaptured response body (truncated to 10 KB)
attemptintegerAttempt number (1 = first try, 2+ = retries)
executed_atstringISO 8601 timestamp of the execution
Pricing Docs
Log in Start free →