curl --request PUT \
--url https://api.blaxel.ai/v0/sandboxes/{sandboxName}/schedules/{scheduleId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "schedule-0",
"input": {
"command": "python train.py --epochs 10",
"env": {},
"keepAlive": true,
"name": "training-job",
"timeout": 3600,
"workingDir": "/app"
},
"maxExecutions": 100,
"type": "cron",
"value": "0 8 * * 1-5"
}
'import requests
url = "https://api.blaxel.ai/v0/sandboxes/{sandboxName}/schedules/{scheduleId}"
payload = {
"id": "schedule-0",
"input": {
"command": "python train.py --epochs 10",
"env": {},
"keepAlive": True,
"name": "training-job",
"timeout": 3600,
"workingDir": "/app"
},
"maxExecutions": 100,
"type": "cron",
"value": "0 8 * * 1-5"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 'schedule-0',
input: {
command: 'python train.py --epochs 10',
env: {},
keepAlive: true,
name: 'training-job',
timeout: 3600,
workingDir: '/app'
},
maxExecutions: 100,
type: 'cron',
value: '0 8 * * 1-5'
})
};
fetch('https://api.blaxel.ai/v0/sandboxes/{sandboxName}/schedules/{scheduleId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.blaxel.ai/v0/sandboxes/{sandboxName}/schedules/{scheduleId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'id' => 'schedule-0',
'input' => [
'command' => 'python train.py --epochs 10',
'env' => [
],
'keepAlive' => true,
'name' => 'training-job',
'timeout' => 3600,
'workingDir' => '/app'
],
'maxExecutions' => 100,
'type' => 'cron',
'value' => '0 8 * * 1-5'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.blaxel.ai/v0/sandboxes/{sandboxName}/schedules/{scheduleId}"
payload := strings.NewReader("{\n \"id\": \"schedule-0\",\n \"input\": {\n \"command\": \"python train.py --epochs 10\",\n \"env\": {},\n \"keepAlive\": true,\n \"name\": \"training-job\",\n \"timeout\": 3600,\n \"workingDir\": \"/app\"\n },\n \"maxExecutions\": 100,\n \"type\": \"cron\",\n \"value\": \"0 8 * * 1-5\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.blaxel.ai/v0/sandboxes/{sandboxName}/schedules/{scheduleId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"schedule-0\",\n \"input\": {\n \"command\": \"python train.py --epochs 10\",\n \"env\": {},\n \"keepAlive\": true,\n \"name\": \"training-job\",\n \"timeout\": 3600,\n \"workingDir\": \"/app\"\n },\n \"maxExecutions\": 100,\n \"type\": \"cron\",\n \"value\": \"0 8 * * 1-5\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blaxel.ai/v0/sandboxes/{sandboxName}/schedules/{scheduleId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"schedule-0\",\n \"input\": {\n \"command\": \"python train.py --epochs 10\",\n \"env\": {},\n \"keepAlive\": true,\n \"name\": \"training-job\",\n \"timeout\": 3600,\n \"workingDir\": \"/app\"\n },\n \"maxExecutions\": 100,\n \"type\": \"cron\",\n \"value\": \"0 8 * * 1-5\"\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "<string>",
"id": "schedule-0",
"input": {
"command": "python train.py --epochs 10",
"env": {},
"keepAlive": true,
"name": "training-job",
"timeout": 3600,
"workingDir": "/app"
},
"maxExecutions": 100,
"sandbox": "<string>",
"type": "cron",
"value": "0 8 * * 1-5"
}Update Sandbox Schedule
Updates a Sandbox Schedule by id.
curl --request PUT \
--url https://api.blaxel.ai/v0/sandboxes/{sandboxName}/schedules/{scheduleId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "schedule-0",
"input": {
"command": "python train.py --epochs 10",
"env": {},
"keepAlive": true,
"name": "training-job",
"timeout": 3600,
"workingDir": "/app"
},
"maxExecutions": 100,
"type": "cron",
"value": "0 8 * * 1-5"
}
'import requests
url = "https://api.blaxel.ai/v0/sandboxes/{sandboxName}/schedules/{scheduleId}"
payload = {
"id": "schedule-0",
"input": {
"command": "python train.py --epochs 10",
"env": {},
"keepAlive": True,
"name": "training-job",
"timeout": 3600,
"workingDir": "/app"
},
"maxExecutions": 100,
"type": "cron",
"value": "0 8 * * 1-5"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 'schedule-0',
input: {
command: 'python train.py --epochs 10',
env: {},
keepAlive: true,
name: 'training-job',
timeout: 3600,
workingDir: '/app'
},
maxExecutions: 100,
type: 'cron',
value: '0 8 * * 1-5'
})
};
fetch('https://api.blaxel.ai/v0/sandboxes/{sandboxName}/schedules/{scheduleId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.blaxel.ai/v0/sandboxes/{sandboxName}/schedules/{scheduleId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'id' => 'schedule-0',
'input' => [
'command' => 'python train.py --epochs 10',
'env' => [
],
'keepAlive' => true,
'name' => 'training-job',
'timeout' => 3600,
'workingDir' => '/app'
],
'maxExecutions' => 100,
'type' => 'cron',
'value' => '0 8 * * 1-5'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.blaxel.ai/v0/sandboxes/{sandboxName}/schedules/{scheduleId}"
payload := strings.NewReader("{\n \"id\": \"schedule-0\",\n \"input\": {\n \"command\": \"python train.py --epochs 10\",\n \"env\": {},\n \"keepAlive\": true,\n \"name\": \"training-job\",\n \"timeout\": 3600,\n \"workingDir\": \"/app\"\n },\n \"maxExecutions\": 100,\n \"type\": \"cron\",\n \"value\": \"0 8 * * 1-5\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.blaxel.ai/v0/sandboxes/{sandboxName}/schedules/{scheduleId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"schedule-0\",\n \"input\": {\n \"command\": \"python train.py --epochs 10\",\n \"env\": {},\n \"keepAlive\": true,\n \"name\": \"training-job\",\n \"timeout\": 3600,\n \"workingDir\": \"/app\"\n },\n \"maxExecutions\": 100,\n \"type\": \"cron\",\n \"value\": \"0 8 * * 1-5\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blaxel.ai/v0/sandboxes/{sandboxName}/schedules/{scheduleId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"schedule-0\",\n \"input\": {\n \"command\": \"python train.py --epochs 10\",\n \"env\": {},\n \"keepAlive\": true,\n \"name\": \"training-job\",\n \"timeout\": 3600,\n \"workingDir\": \"/app\"\n },\n \"maxExecutions\": 100,\n \"type\": \"cron\",\n \"value\": \"0 8 * * 1-5\"\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "<string>",
"id": "schedule-0",
"input": {
"command": "python train.py --epochs 10",
"env": {},
"keepAlive": true,
"name": "training-job",
"timeout": 3600,
"workingDir": "/app"
},
"maxExecutions": 100,
"sandbox": "<string>",
"type": "cron",
"value": "0 8 * * 1-5"
}Authorizations
OAuth2 authentication with JWT tokens
Path Parameters
Name of the Sandbox
Id of the Schedule
Body
A scheduled task that executes a process inside the sandbox at specified times. Stored in the dedicated schedules table (no longer embedded in the sandbox spec).
Unique identifier for this schedule within its sandbox. Auto-generated if not provided.
"schedule-0"
Process execution configuration for a scheduled sandbox task
Show child attributes
Show child attributes
Maximum number of execution records kept for this schedule. Once reached, recording a new execution deletes the oldest. Defaults to 100.
100
Type of schedule timing. 'cron' for recurring (5-field expression), 'at' for a specific RFC 3339 datetime, 'sleep' for a duration from now (resolved to 'at' on creation).
cron, at, sleep "cron"
Timing value. For 'cron': a 5-field cron expression (e.g. '0 8 * * 1-5'). For 'at': an RFC 3339 datetime (e.g. '2026-07-01T09:00:00Z'). For 'sleep': a duration (e.g. '2h', '30m', '7d').
"0 8 * * 1-5"
Response
successful operation
A scheduled task that executes a process inside the sandbox at specified times. Stored in the dedicated schedules table (no longer embedded in the sandbox spec).
Creation timestamp (read-only).
Unique identifier for this schedule within its sandbox. Auto-generated if not provided.
"schedule-0"
Process execution configuration for a scheduled sandbox task
Show child attributes
Show child attributes
Maximum number of execution records kept for this schedule. Once reached, recording a new execution deletes the oldest. Defaults to 100.
100
Name of the sandbox this schedule belongs to.
Type of schedule timing. 'cron' for recurring (5-field expression), 'at' for a specific RFC 3339 datetime, 'sleep' for a duration from now (resolved to 'at' on creation).
cron, at, sleep "cron"
Timing value. For 'cron': a 5-field cron expression (e.g. '0 8 * * 1-5'). For 'at': an RFC 3339 datetime (e.g. '2026-07-01T09:00:00Z'). For 'sleep': a duration (e.g. '2h', '30m', '7d').
"0 8 * * 1-5"
Was this page helpful?
