Skip to main content
Schedules allow you to automate server tasks using cron-like scheduling. Each schedule can have multiple tasks that execute in sequence.

List Schedules

Get all schedules for a server.
curl -X GET "https://panel.example.com/api/client/servers/{server}/schedules" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
server
string
required
The server identifier

Response

{
  "object": "list",
  "data": [
    {
      "object": "server_schedule",
      "attributes": {
        "id": 1,
        "name": "Daily Restart",
        "cron": {
          "day_of_week": "*",
          "day_of_month": "*",
          "month": "*",
          "hour": "3",
          "minute": "0"
        },
        "is_active": true,
        "is_processing": false,
        "only_when_online": false,
        "last_run_at": "2024-01-15T03:00:00+00:00",
        "next_run_at": "2024-01-16T03:00:00+00:00",
        "created_at": "2024-01-01T10:00:00+00:00",
        "updated_at": "2024-01-15T03:00:05+00:00",
        "relationships": {
          "tasks": {
            "object": "list",
            "data": [
              {
                "object": "schedule_task",
                "attributes": {
                  "id": 1,
                  "sequence_id": 1,
                  "action": "command",
                  "payload": "say Server restarting in 30 seconds!",
                  "time_offset": 0,
                  "is_queued": false,
                  "continue_on_failure": false,
                  "created_at": "2024-01-01T10:00:00+00:00",
                  "updated_at": "2024-01-01T10:00:00+00:00"
                }
              },
              {
                "object": "schedule_task",
                "attributes": {
                  "id": 2,
                  "sequence_id": 2,
                  "action": "power",
                  "payload": "restart",
                  "time_offset": 30,
                  "is_queued": false,
                  "continue_on_failure": false,
                  "created_at": "2024-01-01T10:00:00+00:00",
                  "updated_at": "2024-01-01T10:00:00+00:00"
                }
              }
            ]
          }
        }
      }
    }
  ]
}
id
integer
Schedule identifier
name
string
Schedule name
cron
object
Cron expression components (each can be * for “every” or specific values)
is_active
boolean
Whether the schedule is enabled
is_processing
boolean
Whether the schedule is currently executing
only_when_online
boolean
Only run if the server is online
last_run_at
string
ISO 8601 timestamp of last execution
next_run_at
string
ISO 8601 timestamp of next scheduled execution

Create Schedule

Create a new schedule.
curl -X POST "https://panel.example.com/api/client/servers/{server}/schedules" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Nightly Backup",
    "minute": "0",
    "hour": "2",
    "day_of_month": "*",
    "month": "*",
    "day_of_week": "*",
    "is_active": true,
    "only_when_online": false
  }'
name
string
required
Schedule name
minute
string
required
Cron minute field (0-59 or *)
hour
string
required
Cron hour field (0-23 or *)
day_of_month
string
required
Cron day of month field (1-31 or *)
month
string
required
Cron month field (1-12 or *)
day_of_week
string
required
Cron day of week field (0-6 or *, where 0 = Sunday)
is_active
boolean
Enable the schedule immediately (default: true)
only_when_online
boolean
Only execute if server is online (default: false)

Cron Expression Examples

  • Every day at 3 AM: 0 3 * * *
  • Every hour: 0 * * * *
  • Every 30 minutes: */30 * * * *
  • Every Monday at noon: 0 12 * * 1
  • First day of month at midnight: 0 0 1 * *

Response

Returns the created schedule object (same format as list response).

Get Schedule

Get details of a specific schedule.
curl -X GET "https://panel.example.com/api/client/servers/{server}/schedules/{schedule}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
schedule
integer
required
The schedule ID

Update Schedule

Update an existing schedule.
curl -X POST "https://panel.example.com/api/client/servers/{server}/schedules/{schedule}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Daily Restart (Updated)",
    "minute": "0",
    "hour": "4",
    "day_of_month": "*",
    "month": "*",
    "day_of_week": "*",
    "is_active": true,
    "only_when_online": false
  }'
All parameters are the same as create.

Execute Schedule Now

Manually trigger a schedule immediately.
curl -X POST "https://panel.example.com/api/client/servers/{server}/schedules/{schedule}/execute" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"

Response

Returns 202 Accepted when execution begins.

Delete Schedule

Delete a schedule and all its tasks.
curl -X DELETE "https://panel.example.com/api/client/servers/{server}/schedules/{schedule}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"

Response

Returns 204 No Content on success.

Schedule Tasks

Tasks are actions that execute as part of a schedule. They run in sequence based on sequence_id.

Create Task

Add a task to a schedule.
curl -X POST "https://panel.example.com/api/client/servers/{server}/schedules/{schedule}/tasks" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "command",
    "payload": "say Backup starting!",
    "time_offset": 0,
    "continue_on_failure": false
  }'
action
string
required
Task action type:
  • command - Send console command
  • power - Change power state
  • backup - Create backup
payload
string
required
Action-specific payload:
  • For command: The command to execute
  • For power: start, stop, restart, or kill
  • For backup: Empty string or ignored
time_offset
integer
required
Seconds to wait after previous task (0-900)
continue_on_failure
boolean
Continue to next task if this one fails (default: false)

Update Task

Update an existing task.
curl -X POST "https://panel.example.com/api/client/servers/{server}/schedules/{schedule}/tasks/{task}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "command",
    "payload": "say Backup complete!",
    "time_offset": 60,
    "continue_on_failure": true
  }'
task
integer
required
The task ID
All parameters are the same as create.

Delete Task

Remove a task from a schedule.
curl -X DELETE "https://panel.example.com/api/client/servers/{server}/schedules/{schedule}/tasks/{task}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"

Response

Returns 204 No Content on success.

Example: Complete Backup Schedule

Here’s how to create a complete backup schedule with multiple tasks:
# 1. Create the schedule (runs at 2 AM daily)
SCHEDULE_ID=$(curl -X POST "https://panel.example.com/api/client/servers/{server}/schedules" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Nightly Backup",
    "minute": "0",
    "hour": "2",
    "day_of_month": "*",
    "month": "*",
    "day_of_week": "*",
    "is_active": true,
    "only_when_online": false
  }' | jq -r '.attributes.id')

# 2. Add task: Announce backup
curl -X POST "https://panel.example.com/api/client/servers/{server}/schedules/$SCHEDULE_ID/tasks" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "command",
    "payload": "say Creating backup...",
    "time_offset": 0
  }'

# 3. Add task: Create backup (30 seconds later)
curl -X POST "https://panel.example.com/api/client/servers/{server}/schedules/$SCHEDULE_ID/tasks" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "backup",
    "payload": "",
    "time_offset": 30
  }'

# 4. Add task: Announce completion (5 minutes later)
curl -X POST "https://panel.example.com/api/client/servers/{server}/schedules/$SCHEDULE_ID/tasks" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "command",
    "payload": "say Backup complete!",
    "time_offset": 300,
    "continue_on_failure": true
  }'

Build docs developers (and LLMs) love