Skip to content

The Managed Entries API provides CRUD operations for cron jobs that are managed through the Hoody platform. Each entry belongs to a specific system user and is identified by a UUID. Use these endpoints to create new scheduled tasks, list existing entries, retrieve details, update properties, and remove entries from the managed crontab.

Returns a paginated list of managed entries for a given system user. The response includes both managed and raw crontab entries.

GET /users/{user}/entries

NameInTypeRequiredDescription
userpathstringYesSystem username
pagequeryintegerNoPage number (1-based)
limitqueryintegerNoItems per page (max 200)
Terminal window
curl -X GET "https://api.hoody.com/api/cron/entries/users/www-data/entries?page=1&limit=50"
{
"user": "www-data",
"entries": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"schedule": "*/5 * * * *",
"schedule_human": "Every 5 minutes",
"command": "/usr/bin/php /var/www/artisan schedule:run",
"comment": "Laravel scheduler",
"name": "laravel-scheduler",
"enabled": true,
"expired": false,
"expires_at": null,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z",
"type": "managed"
},
{
"line": "0 3 * * * /usr/local/bin/backup.sh",
"type": "raw"
}
],
"total": 2,
"page": 1,
"limit": 50
}

Creates a new managed cron entry for a given system user. The new entry is appended to the system crontab and returned with its assigned id and timestamps.

POST /users/{user}/entries

NameInTypeRequiredDescription
userpathstringYesSystem username
NameTypeRequiredDescription
schedulestringYesCron expression (5-field or @daily-style macro)
commandstringYesCommand to execute
namestring | nullNoDisplay name for the entry
commentstring | nullNoShort single-line comment
enabledboolean | nullNoWhether the entry is active
expires_atstring | nullNoISO 8601 expiration timestamp
Terminal window
curl -X POST "https://api.hoody.com/api/cron/entries/users/www-data/entries" \
-H "Content-Type: application/json" \
-d '{
"schedule": "*/5 * * * *",
"command": "/usr/bin/php /var/www/artisan schedule:run",
"name": "laravel-scheduler",
"comment": "Laravel scheduler",
"enabled": true
}'
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"user": "www-data",
"schedule": "*/5 * * * *",
"schedule_human": "Every 5 minutes",
"command": "/usr/bin/php /var/www/artisan schedule:run",
"comment": "Laravel scheduler",
"name": "laravel-scheduler",
"enabled": true,
"expired": false,
"expires_at": null,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}

Retrieves a single managed entry by its id.

GET /users/{user}/entries/{id}

NameInTypeRequiredDescription
userpathstringYesSystem username
idpathstringYesManaged entry id
Terminal window
curl -X GET "https://api.hoody.com/api/cron/entries/users/www-data/entries/a1b2c3d4-e5f6-7890-abcd-ef1234567890"
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"user": "www-data",
"schedule": "*/5 * * * *",
"schedule_human": "Every 5 minutes",
"command": "/usr/bin/php /var/www/artisan schedule:run",
"comment": "Laravel scheduler",
"name": "laravel-scheduler",
"enabled": true,
"expired": false,
"expires_at": null,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}

Partially updates a managed entry. Only the fields included in the request body are modified; omitted fields are left unchanged. Set clear_expiration to true to remove an existing expiration timestamp.

PATCH /users/{user}/entries/{id}

NameInTypeRequiredDescription
userpathstringYesSystem username
idpathstringYesManaged entry id
NameTypeRequiredDescription
schedulestring | nullNoCron expression (5-field or @daily-style macro)
commandstring | nullNoCommand to execute
namestring | nullNoDisplay name for the entry
commentstring | nullNoShort single-line comment
enabledboolean | nullNoWhether the entry is active
expires_atstring | nullNoISO 8601 expiration timestamp
clear_expirationboolean | nullNoWhen true, remove any existing expiration timestamp
Terminal window
curl -X PATCH "https://api.hoody.com/api/cron/entries/users/www-data/entries/a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
-H "Content-Type: application/json" \
-d '{
"enabled": false,
"comment": "Disabled for maintenance"
}'
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"user": "www-data",
"schedule": "*/5 * * * *",
"schedule_human": "Every 5 minutes",
"command": "/usr/bin/php /var/www/artisan schedule:run",
"comment": "Disabled for maintenance",
"name": "laravel-scheduler",
"enabled": false,
"expired": false,
"expires_at": null,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T11:05:42Z"
}

Removes a managed entry from the system crontab. Returns a deleted flag confirming the operation.

DELETE /users/{user}/entries/{id}

NameInTypeRequiredDescription
userpathstringYesSystem username
idpathstringYesManaged entry id
Terminal window
curl -X DELETE "https://api.hoody.com/api/cron/entries/users/www-data/entries/a1b2c3d4-e5f6-7890-abcd-ef1234567890"
{
"deleted": true
}