v52

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-03269339953.6 KB
Hosting: Cron Jobs

Create account cron job

Creates a cron job for the specified account from a schedule expression and a command.

Returns the created cron job, including its uid, which is required to delete the cron job or fetch its output.

post/api/hosting/v1/accounts/{username}/cron-jobs

Path parameters

usernamestring required
Example:u123456789

Request body

timestring required

Cron schedule expression (for example "0 2 * * *" runs daily at 02:00).

commandstring required

Command to execute on the schedule.

Example request

{
  "time": "0 2 * * *",
  "command": "php /home/u123456789/cleanup.php"
}

Response

Success response

uidstring

Unique identifier of the cron job. Use it to delete the cron job or fetch its output.

usernamestring

Username of the account that owns the cron job.

timestring

Cron schedule expression.

commandstring

Command executed on the schedule.

Example response

{
  "uid": "cron_abc123",
  "username": "u123456789",
  "time": "0 2 * * *",
  "command": "php /home/u123456789/cleanup.php"
}