Cron Jobs

Updated Oct 4, 2026 Markdown

GET /api/v1/accounts/{username}/cron

List cron jobs

Returns every cron job defined for the account.

Path parameters:

Name Type Required Notes
username string yes —

Responses:

Status Schema Description
200 ApiSuccess_list_CronResponse__ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": [
    {
      "command": "...",
      "day": "...",
      "enabled": "...",
      "hour": "...",
      "id": "...",
      "last_run": "...",
      "minute": "...",
      "month": "...",
      "schedule": "...",
      "weekday": "..."
    }
  ],
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X GET \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/accounts/{username}/cron

POST /api/v1/accounts/{username}/cron

Create cron job

Define a new cron entry under the account's crontab.

Path parameters:

Name Type Required Notes
username string yes —

Body fields:

Field Type Required Notes
command string yes maxLength=1024
day string no default *; maxLength=120
enabled boolean no default True
hour string no default *; maxLength=120
minute string no default *; maxLength=120
month string no default *; maxLength=120
weekday string no default *; maxLength=120

Request body example:

JSON
{
  "command": "string",
  "day": "*",
  "enabled": true,
  "hour": "*",
  "minute": "*",
  "month": "*",
  "weekday": "*"
}

Responses:

Status Schema Description
200 ApiSuccess_CronResponse_ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {
    "command": "string",
    "day": "string",
    "enabled": false,
    "hour": "string",
    "id": "string",
    "last_run": "...",
    "minute": "string",
    "month": "string",
    "schedule": "string",
    "weekday": "string"
  },
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X POST \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  -H "Content-Type: application/json" \
  -d @body.json \
  https://your-server:2000/api/v1/accounts/{username}/cron

DELETE /api/v1/accounts/{username}/cron/{cron_id}

Delete cron job

Remove a cron entry by id.

Path parameters:

Name Type Required Notes
username string yes —
cron_id string yes —

Responses:

Status Schema Description
200 MessageResponse Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "message": "string",
  "status": "success"
}

cURL example:

shell
curl -X DELETE \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/accounts/{username}/cron/{cron_id}

PUT /api/v1/accounts/{username}/cron/{cron_id}

Update cron job

Patch the schedule / command / enabled flag of an existing cron entry.

Path parameters:

Name Type Required Notes
username string yes —
cron_id string yes —

Body fields:

Field Type Required Notes
command string no —
day string no —
enabled boolean no —
hour string no —
minute string no —
month string no —
weekday string no —

Request body example:

JSON
{
  "command": "string",
  "day": "string",
  "enabled": false,
  "hour": "string",
  "minute": "string",
  "month": "string",
  "weekday": "string"
}

Responses:

Status Schema Description
200 ApiSuccess_CronResponse_ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {
    "command": "string",
    "day": "string",
    "enabled": false,
    "hour": "string",
    "id": "string",
    "last_run": "...",
    "minute": "string",
    "month": "string",
    "schedule": "string",
    "weekday": "string"
  },
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X PUT \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  -H "Content-Type: application/json" \
  -d @body.json \
  https://your-server:2000/api/v1/accounts/{username}/cron/{cron_id}

POST /api/v1/accounts/{username}/cron/{cron_id}/run

Run cron job manually

Execute the cron command immediately. Response data is the exec result (exit_code, success, stdout/stderr).

Path parameters:

Name Type Required Notes
username string yes —
cron_id string yes —

Responses:

Status Schema Description
200 ApiSuccess_dict_str__Any__ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {},
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X POST \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/accounts/{username}/cron/{cron_id}/run
Still Need Help?

Our support team is here around the clock for anything you can't find above.