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
Name In Type Required Description userpath string Yes System username pagequery integer No Page number (1-based) limitquery integer No Items per page (max 200)
curl -X GET " https://api.hoody.com/api/cron/entries/users/www-data/entries?page=1&limit=50 "
const iterator = client . cron . entries . listIterator ( { user: " www-data " } );
for await ( const entry of iterator ) {
console . log ( entry . id , entry . schedule );
"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 " ,
"created_at" : " 2024-01-15T10:30:00Z " ,
"updated_at" : " 2024-01-15T10:30:00Z " ,
"line" : " 0 3 * * * /usr/local/bin/backup.sh " ,
"code" : " INVALID_PAGINATION " ,
"message" : " Invalid pagination " ,
Error Code Title Description Resolution INVALID_USERInvalid user User parameter failed validation Provide a valid system username INVALID_COMMENTInvalid comment Comment is empty, too long, or contains newlines Provide a short single-line comment INVALID_SCHEDULEInvalid schedule Schedule is not a valid cron expression Use a standard 5-field cron expression or @daily style macros INVALID_COMMANDInvalid command Command field is empty or contains invalid characters Provide a command without newlines INVALID_PAGINATIONInvalid pagination Page or limit is out of range Use page ≥ 1 and limit between 1 and 200
"code" : " USER_NOT_FOUND " ,
"message" : " User not found " ,
Error Code Title Description Resolution USER_NOT_FOUNDUser not found The requested system user does not exist Create the user or choose an existing username ENTRY_NOT_FOUNDEntry not found No managed entry with the provided id exists List entries and retry with a valid id
"message" : " Internal server error " ,
Error Code Title Description Resolution BACKEND_ERRORBackend error Failed to read or write system crontab Check crontab availability and permissions
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
Name In Type Required Description userpath string Yes System username
Name Type Required Description schedulestring Yes Cron expression (5-field or @daily-style macro) commandstring Yes Command to execute namestring | null No Display name for the entry commentstring | null No Short single-line comment enabledboolean | null No Whether the entry is active expires_atstring | null No ISO 8601 expiration timestamp
curl -X POST " https://api.hoody.com/api/cron/entries/users/www-data/entries " \
-H " Content-Type: application/json " \
"schedule": "*/5 * * * *",
"command": "/usr/bin/php /var/www/artisan schedule:run",
"name": "laravel-scheduler",
"comment": "Laravel scheduler",
const entry = await client . cron . entries . create ( {
command: " /usr/bin/php /var/www/artisan schedule:run " ,
name: " laravel-scheduler " ,
comment: " Laravel scheduler " ,
"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 " ,
"created_at" : " 2024-01-15T10:30:00Z " ,
"updated_at" : " 2024-01-15T10:30:00Z "
"code" : " INVALID_SCHEDULE " ,
"message" : " Invalid schedule " ,
Error Code Title Description Resolution INVALID_USERInvalid user User parameter failed validation Provide a valid system username INVALID_COMMENTInvalid comment Comment is empty, too long, or contains newlines Provide a short single-line comment INVALID_SCHEDULEInvalid schedule Schedule is not a valid cron expression Use a standard 5-field cron expression or @daily style macros INVALID_COMMANDInvalid command Command field is empty or contains invalid characters Provide a command without newlines INVALID_PAGINATIONInvalid pagination Page or limit is out of range Use page ≥ 1 and limit between 1 and 200
"code" : " USER_NOT_FOUND " ,
"message" : " User not found " ,
Error Code Title Description Resolution USER_NOT_FOUNDUser not found The requested system user does not exist Create the user or choose an existing username ENTRY_NOT_FOUNDEntry not found No managed entry with the provided id exists List entries and retry with a valid id
"message" : " Internal server error " ,
Error Code Title Description Resolution BACKEND_ERRORBackend error Failed to read or write system crontab Check crontab availability and permissions
Retrieves a single managed entry by its id.
GET /users/{user}/entries/{id}
Name In Type Required Description userpath string Yes System username idpath string Yes Managed entry id
curl -X GET " https://api.hoody.com/api/cron/entries/users/www-data/entries/a1b2c3d4-e5f6-7890-abcd-ef1234567890 "
const entry = await client . cron . entries . get ( {
id: " a1b2c3d4-e5f6-7890-abcd-ef1234567890 "
console . log ( entry . schedule , entry . command );
"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 " ,
"created_at" : " 2024-01-15T10:30:00Z " ,
"updated_at" : " 2024-01-15T10:30:00Z "
"message" : " Invalid user " ,
Error Code Title Description Resolution INVALID_USERInvalid user User parameter failed validation Provide a valid system username INVALID_COMMENTInvalid comment Comment is empty, too long, or contains newlines Provide a short single-line comment INVALID_SCHEDULEInvalid schedule Schedule is not a valid cron expression Use a standard 5-field cron expression or @daily style macros INVALID_COMMANDInvalid command Command field is empty or contains invalid characters Provide a command without newlines INVALID_PAGINATIONInvalid pagination Page or limit is out of range Use page ≥ 1 and limit between 1 and 200
"code" : " ENTRY_NOT_FOUND " ,
"message" : " Entry not found " ,
Error Code Title Description Resolution USER_NOT_FOUNDUser not found The requested system user does not exist Create the user or choose an existing username ENTRY_NOT_FOUNDEntry not found No managed entry with the provided id exists List entries and retry with a valid id
"message" : " Internal server error " ,
Error Code Title Description Resolution BACKEND_ERRORBackend error Failed to read or write system crontab Check crontab availability and permissions
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}
Name In Type Required Description userpath string Yes System username idpath string Yes Managed entry id
Name Type Required Description schedulestring | null No Cron expression (5-field or @daily-style macro) commandstring | null No Command to execute namestring | null No Display name for the entry commentstring | null No Short single-line comment enabledboolean | null No Whether the entry is active expires_atstring | null No ISO 8601 expiration timestamp clear_expirationboolean | null No When true, remove any existing expiration timestamp
curl -X PATCH " https://api.hoody.com/api/cron/entries/users/www-data/entries/a1b2c3d4-e5f6-7890-abcd-ef1234567890 " \
-H " Content-Type: application/json " \
"comment": "Disabled for maintenance"
const entry = await client . cron . entries . update ( {
id: " a1b2c3d4-e5f6-7890-abcd-ef1234567890 " ,
comment: " Disabled for maintenance "
console . log ( entry . enabled );
"id" : " a1b2c3d4-e5f6-7890-abcd-ef1234567890 " ,
"schedule" : " */5 * * * * " ,
"schedule_human" : " Every 5 minutes " ,
"command" : " /usr/bin/php /var/www/artisan schedule:run " ,
"comment" : " Disabled for maintenance " ,
"name" : " laravel-scheduler " ,
"created_at" : " 2024-01-15T10:30:00Z " ,
"updated_at" : " 2024-01-15T11:05:42Z "
"code" : " INVALID_COMMAND " ,
"message" : " Invalid command " ,
Error Code Title Description Resolution INVALID_USERInvalid user User parameter failed validation Provide a valid system username INVALID_COMMENTInvalid comment Comment is empty, too long, or contains newlines Provide a short single-line comment INVALID_SCHEDULEInvalid schedule Schedule is not a valid cron expression Use a standard 5-field cron expression or @daily style macros INVALID_COMMANDInvalid command Command field is empty or contains invalid characters Provide a command without newlines INVALID_PAGINATIONInvalid pagination Page or limit is out of range Use page ≥ 1 and limit between 1 and 200
"code" : " ENTRY_NOT_FOUND " ,
"message" : " Entry not found " ,
Error Code Title Description Resolution USER_NOT_FOUNDUser not found The requested system user does not exist Create the user or choose an existing username ENTRY_NOT_FOUNDEntry not found No managed entry with the provided id exists List entries and retry with a valid id
"message" : " Internal server error " ,
Error Code Title Description Resolution BACKEND_ERRORBackend error Failed to read or write system crontab Check crontab availability and permissions
Removes a managed entry from the system crontab. Returns a deleted flag confirming the operation.
DELETE /users/{user}/entries/{id}
Name In Type Required Description userpath string Yes System username idpath string Yes Managed entry id
curl -X DELETE " https://api.hoody.com/api/cron/entries/users/www-data/entries/a1b2c3d4-e5f6-7890-abcd-ef1234567890 "
const result = await client . cron . entries . delete ( {
id: " a1b2c3d4-e5f6-7890-abcd-ef1234567890 "
console . log ( result . deleted );
"message" : " Invalid user " ,
Error Code Title Description Resolution INVALID_USERInvalid user User parameter failed validation Provide a valid system username INVALID_COMMENTInvalid comment Comment is empty, too long, or contains newlines Provide a short single-line comment INVALID_SCHEDULEInvalid schedule Schedule is not a valid cron expression Use a standard 5-field cron expression or @daily style macros INVALID_COMMANDInvalid command Command field is empty or contains invalid characters Provide a command without newlines INVALID_PAGINATIONInvalid pagination Page or limit is out of range Use page ≥ 1 and limit between 1 and 200
"code" : " ENTRY_NOT_FOUND " ,
"message" : " Entry not found " ,
Error Code Title Description Resolution USER_NOT_FOUNDUser not found The requested system user does not exist Create the user or choose an existing username ENTRY_NOT_FOUNDEntry not found No managed entry with the provided id exists List entries and retry with a valid id
"message" : " Internal server error " ,
Error Code Title Description Resolution BACKEND_ERRORBackend error Failed to read or write system crontab Check crontab availability and permissions