Trigger Schedule
curl --request POST \
--url https://api.example.com/agents/{agent_id}/schedules/{schedule_name}/triggerimport requests
url = "https://api.example.com/agents/{agent_id}/schedules/{schedule_name}/trigger"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/agents/{agent_id}/schedules/{schedule_name}/trigger', 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.example.com/agents/{agent_id}/schedules/{schedule_name}/trigger",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/agents/{agent_id}/schedules/{schedule_name}/trigger"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/agents/{agent_id}/schedules/{schedule_name}/trigger")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/agents/{agent_id}/schedules/{schedule_name}/trigger")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"schedule_id": "<string>",
"name": "<string>",
"agent_id": "<string>",
"state": "ACTIVE",
"action": {
"workflow_name": "<string>",
"workflow_id_prefix": "<string>",
"task_queue": "<string>",
"workflow_params": [
"<unknown>"
]
},
"spec": {
"cron_expressions": [
"<string>"
],
"intervals_seconds": [
123
],
"start_at": "2023-11-07T05:31:56Z",
"end_at": "2023-11-07T05:31:56Z"
},
"num_actions_taken": 0,
"num_actions_missed": 0,
"next_action_times": [
"2023-11-07T05:31:56Z"
],
"last_action_time": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Schedules
Trigger Schedule
Trigger a schedule to run immediately, regardless of its regular schedule.
POST
/
agents
/
{agent_id}
/
schedules
/
{schedule_name}
/
trigger
Trigger Schedule
curl --request POST \
--url https://api.example.com/agents/{agent_id}/schedules/{schedule_name}/triggerimport requests
url = "https://api.example.com/agents/{agent_id}/schedules/{schedule_name}/trigger"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/agents/{agent_id}/schedules/{schedule_name}/trigger', 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.example.com/agents/{agent_id}/schedules/{schedule_name}/trigger",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/agents/{agent_id}/schedules/{schedule_name}/trigger"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/agents/{agent_id}/schedules/{schedule_name}/trigger")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/agents/{agent_id}/schedules/{schedule_name}/trigger")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"schedule_id": "<string>",
"name": "<string>",
"agent_id": "<string>",
"state": "ACTIVE",
"action": {
"workflow_name": "<string>",
"workflow_id_prefix": "<string>",
"task_queue": "<string>",
"workflow_params": [
"<unknown>"
]
},
"spec": {
"cron_expressions": [
"<string>"
],
"intervals_seconds": [
123
],
"start_at": "2023-11-07T05:31:56Z",
"end_at": "2023-11-07T05:31:56Z"
},
"num_actions_taken": 0,
"num_actions_missed": 0,
"next_action_times": [
"2023-11-07T05:31:56Z"
],
"last_action_time": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Response
Successful Response
Response model for schedule operations
Unique identifier for the schedule
Human-readable name for the schedule
ID of the agent this schedule belongs to
Current state of the schedule
Available options:
ACTIVE, PAUSED Information about the scheduled action
Show child attributes
Show child attributes
Schedule specification
Show child attributes
Show child attributes
Number of times the schedule has executed
Number of scheduled executions that were missed
Upcoming scheduled execution times
When the schedule last executed
When the schedule was created

