Create website cron job
Creates a cron job for an Agency Plan website from a schedule expression and a command. Returns the created cron job, including its uuid, which is required to delete the cron job.
Creates a cron job for an Agency Plan website from a schedule expression and a command.
Returns the created cron job, including its uuid, which is required to delete the cron job.
API Token authentication
Agency Plan website UID
zpwlGlp19Cron schedule expression (standard 5-field crontab syntax).
*/30 * * * *Command to run on the schedule. Must not contain pipe (|) or redirection (<, >) characters.
php artisan schedule:runSuccess response
Unique identifier of the cron job. Use it to delete the cron job.
01931d6f-68f5-7b72-8d9e-09c6e1e6aa0eCron schedule expression.
*/30 * * * *Command executed on the configured schedule.
php artisan schedule:runCron job creation timestamp.
2024-10-28T12:00:00+00:00Unauthenticated response
Validation error response
Error response
POST /api/agency-hosting/v1/websites/{website_uid}/cron-jobs HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 60
{
"time": "*/30 * * * *",
"command": "php artisan schedule:run"
}{
"uuid": "01931d6f-68f5-7b72-8d9e-09c6e1e6aa0e",
"time": "*/30 * * * *",
"command": "php artisan schedule:run",
"created_at": "2024-10-28T12:00:00+00:00"
}Last updated
Was this helpful?