Skip to content
Hoody.com

GET /crontab

Returns a paginated list of every system user that has a crontab file, along with each user’s full crontab text.

NameInTypeRequiredDescription
pagequeryintegerNoPage number (1-based)
limitqueryintegerNoItems per page (max 200)
Terminal window
curl -X GET "https://acme-web01-cron-1.eu-west-1.containers.hoody.icu/crontab?page=1&limit=50"
{
"items": [
{
"user": "root",
"crontab": "0 5 * * * /usr/bin/backup.sh\n"
},
{
"user": "app",
"crontab": "@daily /opt/app/rotate-logs.sh\n"
}
],
"page": 1,
"limit": 50,
"total": 2
}

GET /users/{user}/crontab

Returns the raw crontab text for a single system user.

NameInTypeRequiredDescription
userpathstringYesSystem username
Terminal window
curl -X GET "https://acme-web01-cron-1.eu-west-1.containers.hoody.icu/users/app/crontab"
{
"user": "app",
"crontab": "@daily /opt/app/rotate-logs.sh\n"
}

PUT /users/{user}/crontab

Replaces the user’s crontab with the provided text. The response includes the written crontab and a count of any expired entries that were removed during the replacement.

NameInTypeRequiredDescription
userpathstringYesSystem username
FieldTypeRequiredDescription
crontabstringYesFull crontab text to write for the user
Terminal window
curl -X PUT "https://acme-web01-cron-1.eu-west-1.containers.hoody.icu/users/app/crontab" \
-H "Content-Type: application/json" \
-d '{"crontab":"@daily /opt/app/rotate-logs.sh\n"}'
{
"user": "app",
"crontab": "@daily /opt/app/rotate-logs.sh\n",
"removed_expired": 0
}