Skip to content
Hoody.com

The Managed Entries API manages cron entries owned by a specific system user inside a Hoody container. Managed entries are persisted alongside the raw crontab, identified by a stable UUID, and can be enabled, disabled, rescheduled, or given an expiration timestamp.

All endpoints on this page are scoped to a single container, addressed through the cron host pattern `{projectId}-{containerId}-cron-1.{server}.containers.hoody.com`. Replace {projectId} and {containerId} with the IDs of the project and container that own the cron service, and replace {server} with the region node that hosts the container.

The list endpoint returns both managed entries (those created through this API) and raw entries (any non-managed lines that already exist in the user’s crontab).

Returns a paginated list of crontab entries belonging to a system user. Each item in the entries array is either a managed entry or a raw line.

NameInTypeRequiredDescription
userpathstringYesSystem username
pagequeryintegerNoPage number (1-based, default 1)
limitqueryintegerNoItems per page (default 50, max 200)
Terminal window
curl -X GET "https://{projectId}-{containerId}-cron-1.{server}.containers.hoody.com/api/v1/cron/users/www-data/entries?page=1&limit=50"

Creates a new managed cron entry for the given system user. The required schedule is a standard 5-field cron expression (or @daily style macro), and command is the shell command to execute. Optional fields include a human-readable name, an inline comment, the initial enabled state, and an expires_at timestamp.

If a managed entry already exists with the same schedule, command, name, comment, expires_at, and enabled, the request returns the existing entry with status 200 instead of writing a duplicate. If the entry exists with a different name, comment, expires_at, or enabled, the request returns 409 ENTRY_EXISTS.

NameInTypeRequiredDescription
userpathstringYesSystem username
FieldTypeRequiredDescription
schedulestringYesCron expression (5 fields or @daily style macro)
commandstringYesShell command to execute
namestring | nullNoHuman-readable label for the entry
commentstring | nullNoInline comment placed before the schedule
enabledboolean | nullNoInitial enabled state
expires_atstring | nullNoRFC 3339 timestamp strictly in the future (a past value is refused with 400 EXPIRES_IN_PAST); the entry is removed when reached
Terminal window
curl -X POST "https://{projectId}-{containerId}-cron-1.{server}.containers.hoody.com/api/v1/cron/users/www-data/entries" \
-H "Content-Type: application/json" \
-d '{
"schedule": "0 2 * * *",
"command": "/opt/backups/run.sh",
"name": "Nightly backup",
"comment": "Nightly database snapshot",
"enabled": true
}'

Returns a single managed entry by id. Raw entries are not addressable individually and return ENTRY_NOT_FOUND if requested.

GET /api/v1/cron/users/{user}/entries/{id}

Section titled “GET /api/v1/cron/users/{user}/entries/{id}”
NameInTypeRequiredDescription
userpathstringYesSystem username
idpathstringYesManaged entry id (UUID)
Terminal window
curl -X GET "https://{projectId}-{containerId}-cron-1.{server}.containers.hoody.com/api/v1/cron/users/www-data/entries/9c1b9c2a-7e8d-4f3a-b5e1-2a3b4c5d6e7f"

Partially updates a managed entry. Any field omitted from the request body is left unchanged. Pass clear_expiration: true to remove an existing expires_at instead of replacing it.

PATCH /api/v1/cron/users/{user}/entries/{id}

Section titled “PATCH /api/v1/cron/users/{user}/entries/{id}”
NameInTypeRequiredDescription
userpathstringYesSystem username
idpathstringYesManaged entry id (UUID)
FieldTypeRequiredDescription
schedulestring | nullNoNew cron expression
commandstring | nullNoNew shell command
namestring | nullNoNew human-readable label
commentstring | nullNoNew inline comment
enabledboolean | nullNoNew enabled state
expires_atstring | nullNoNew RFC 3339 expiration timestamp, strictly in the future (a past value is refused with 400 EXPIRES_IN_PAST); the entry is removed when reached
clear_expirationboolean | nullNoWhen true, clears any existing expires_at
Terminal window
curl -X PATCH "https://{projectId}-{containerId}-cron-1.{server}.containers.hoody.com/api/v1/cron/users/www-data/entries/9c1b9c2a-7e8d-4f3a-b5e1-2a3b4c5d6e7f" \
-H "Content-Type: application/json" \
-d '{
"schedule": "30 2 * * *",
"enabled": false
}'

Removes a managed entry from the user’s crontab. The entry is identified by its UUID; raw lines cannot be deleted through this endpoint.

DELETE /api/v1/cron/users/{user}/entries/{id}

Section titled “DELETE /api/v1/cron/users/{user}/entries/{id}”
NameInTypeRequiredDescription
userpathstringYesSystem username
idpathstringYesManaged entry id (UUID)
Terminal window
curl -X DELETE "https://{projectId}-{containerId}-cron-1.{server}.containers.hoody.com/api/v1/cron/users/www-data/entries/9c1b9c2a-7e8d-4f3a-b5e1-2a3b4c5d6e7f"