Crontabs

List crontabs

List all the crontabs available in the server.

GET api/servers/{server}/crontabs

Example request:

curl -X GET "https://ploi.io/api/servers/{server}/crontabs" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Create crontab

Creates a new crontab in your server

POST api/servers/{server}/crontabs

Parameters

Parameter Type Status Description
user string required Maximum: 255
command string required Maximum: 255
frequency string required Maximum: 50

Example request:

curl -X POST "https://ploi.io/api/servers/{server}/crontabs" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data '{"user":"ploi", "command":"/home/ploi/domain.com/php artisan schedule:run", "frequency":"* * * * *"}'

Get crontab

Get the selected crontab

GET api/servers/{server}/crontabs/{id}

Example request:

curl -X GET "https://ploi.io/api/servers/{server}/crontabs/{id}" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Delete crontab

Deletes a crontab in your server

DELETE api/servers/{server}/crontabs/{id}

Example request:

curl -X DELETE "https://ploi.io/api/servers/{server}/crontabs/{id}" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"