The Raw Crontab API reads and writes the full cron table for a system user as a single text blob. Use these endpoints when you need to inspect or replace the entire /var/spool/cron/{user} content at once. For structured, per-entry management — create, update, delete individual cron entries by id — use the cron:entries endpoints under /users/{user}/entries/{id} instead. Those are documented separately and are not covered here.
All requests target the cron service in a Hoody project container. The hostname follows the pattern https://{projectId}-{containerId}-cron-1.{server}.containers.hoody.com, where {projectId} and {containerId} are 24-character hexadecimal identifiers and {server} is the deployment region (for example node-us).
GET /crontab
Returns the raw crontab text for every system user that has one, paginated.
Name In Type Required Description pagequery integer No Page number (1-based) limitquery integer No Items per page (max 200)
curl -X GET " https://{projectId}-{containerId}-cron-1.{server}.containers.hoody.com/crontab?page=1&limit=50 " \
-H " Authorization: Bearer <token> "
import { HoodyClient } from ' hoody-sdk ' ;
const client = new HoodyClient ({ baseURL : ' https://{projectId}-{containerId}-cron-1.{server}.containers.hoody.com ' , token : process . env . HOODY_TOKEN });
await client . cron . crontab . listGlobalIterator ({ page : 1 , limit : 50 });
" crontab " : " # m h dom mon dow command \n 0 * * * * /usr/local/bin/cleanup.sh \n "
" message " : " Internal server error "
Error Code Title Description Resolution BACKEND_ERRORBackend error Failed to read or write system crontab Check crontab availability and permissions
GET /users/{user}/crontab
Returns the raw text of the crontab for the specified system user. The response contains only the user and the full crontab text — no entry, id, or pagination metadata.
Name In Type Required Description userpath string Yes System username
curl -X GET " https://{projectId}-{containerId}-cron-1.{server}.containers.hoody.com/users/app/crontab " \
-H " Authorization: Bearer <token> "
import { HoodyClient } from ' hoody-sdk ' ;
const client = new HoodyClient ({ baseURL : ' https://{projectId}-{containerId}-cron-1.{server}.containers.hoody.com ' , token : process . env . HOODY_TOKEN });
await client . cron . crontab . get ( ' app ' );
" crontab " : " # m h dom mon dow command \n */15 * * * * /opt/app/sync.py \n "
" 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 " : " 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
PUT /users/{user}/crontab
Replaces the entire crontab for the specified system user. The request body is a single crontab string; the new content fully overwrites whatever was previously installed. The 200 response also reports how many expired scheduled runs were cleaned up as a side effect (removed_expired).
Name In Type Required Description userpath string Yes System username
Field Type Required Description crontabstring Yes Full crontab text to install for the user
curl -X PUT " https://{projectId}-{containerId}-cron-1.{server}.containers.hoody.com/users/app/crontab " \
-H " Authorization: Bearer <token> " \
-H " Content-Type: application/json " \
-d ' {"crontab": "# m h dom mon dow command\n*/5 * * * * /opt/app/heartbeat.sh\n"} '
import { HoodyClient } from ' hoody-sdk ' ;
const client = new HoodyClient ({ baseURL : ' https://{projectId}-{containerId}-cron-1.{server}.containers.hoody.com ' , token : process . env . HOODY_TOKEN });
await client . cron . crontab . put ( ' app ' , { crontab : ' # m h dom mon dow command \n */5 * * * * /opt/app/heartbeat.sh \n ' });
" crontab " : " # m h dom mon dow command \n */5 * * * * /opt/app/heartbeat.sh \n " ,
" 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 " : " 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
" code " : " PAYLOAD_TOO_LARGE " ,
" message " : " Payload too large " ,
Error Code Title Description Resolution PAYLOAD_TOO_LARGEPayload too large The submitted crontab body exceeded the server’s maximum size Reduce the crontab size and retry
" message " : " Internal server error "
Error Code Title Description Resolution BACKEND_ERRORBackend error Failed to read or write system crontab Check crontab availability and permissions