The Raw Crontab API provides low-level access to the system crontab for a given user. Use these endpoints to read the full crontab contents for a user, list the crontabs available across all users, and overwrite a user’s crontab with a raw payload. These endpoints are useful when you need to inspect or bulk-replace a crontab without going through the managed entry endpoints.
GET /crontab
Returns a paginated list of crontab entries for every user known to the system.
Name In Type Required Description pagequery integer No Page number (1-based) limitquery integer No Items per page (max 200)
curl -X GET " https://api.example.com/api/cron/crontab/?page=1&limit=50 " \
-H " Authorization: Bearer <token> "
const page = await client . cron . crontab . listGlobalIterator ( { page: 1 , limit: 50 } );
for await ( const crontab of page ) {
"crontab" : " # m h dom mon dow command \n 0 2 * * * /usr/local/bin/backup.sh " ,
"crontab" : " # m h dom mon dow command \n */15 * * * * /usr/local/bin/healthcheck.sh " ,
"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 crontab contents for a single system user.
Name In Type Required Description userpath string Yes System username
curl -X GET " https://api.example.com/api/cron/crontab/users/root/crontab " \
-H " Authorization: Bearer <token> "
const crontab = await client . cron . crontab . get ( { user: " root " } );
console . log ( crontab . crontab );
"crontab" : " # m h dom mon dow command \n 0 2 * * * /usr/local/bin/backup.sh " ,
"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 or higher 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 crontab for the given user with the supplied raw contents. Returns the updated crontab and the number of expired entries that were pruned during the operation.
Name In Type Required Description userpath string Yes System username
curl -X PUT " https://api.example.com/api/cron/crontab/users/root/crontab " \
-H " Authorization: Bearer <token> " \
-H " Content-Type: application/json " \
"crontab": "# m h dom mon dow command\n0 2 * * * /usr/local/bin/backup.sh"
const result = await client . cron . crontab . put ( {
crontab: " # m h dom mon dow command \n 0 2 * * * /usr/local/bin/backup.sh "
console . log ( result . removed_expired );
"crontab" : " # m h dom mon dow command \n 0 2 * * * /usr/local/bin/backup.sh " ,
"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 or higher 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" : " Crontab payload exceeds the maximum allowed size "
"message" : " Internal server error "
Error Code Title Description Resolution BACKEND_ERRORBackend error Failed to read or write system crontab Check crontab availability and permissions