List account cron jobs
Returns the list of cron jobs configured for the specified account, including their schedule and command.
Returns the list of cron jobs configured for the specified account, including their schedule and command.
Authorizations
AuthorizationstringRequired
API Token authentication
Path parameters
usernamestringRequiredExample:
u123456789Responses
200
Success response
application/json
Array of Hosting.V1.CronJobs.CronJobResource
uidstringOptionalExample:
Unique identifier of the cron job. Use it to delete the cron job or fetch its output.
cron_abc123usernamestringOptionalExample:
Username of the account that owns the cron job.
u123456789timestringOptionalExample:
Cron schedule expression.
0 2 * * *commandstringOptionalExample:
Command executed on the schedule.
php /home/u123456789/cleanup.php401
Unauthenticated response
application/json
500
Error response
application/json
get/api/hosting/v1/accounts/{username}/cron-jobs
GET /api/hosting/v1/accounts/{username}/cron-jobs HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
{
"uid": "cron_abc123",
"username": "u123456789",
"time": "0 2 * * *",
"command": "php /home/u123456789/cleanup.php"
}
]Last updated
Was this helpful?