Skip to main content

Scheduled Events API

Complete API reference for managing scheduled workflow events with JavaScript, cURL, and MCP examples.

Overview

Scheduled Events allow you to trigger workflow executions on a schedule. Events can be configured using either:

  • Cron expressions - For recurring schedules (e.g., "every Monday at 9am")
  • Datetime - For one-time scheduled executions

Scheduled events are associated with a specific workflow entity (event node) and workflow.

Schedule Status

Schedule status is determined by the nextRunAt field:

  • Active/Pending: nextRunAt contains a future timestamp - the schedule will execute at that time
  • Completed/Inactive: nextRunAt is null - one-time schedules that have executed, or schedules that have been disabled

For cron schedules, nextRunAt is automatically recalculated after each execution. For one-time datetime schedules, nextRunAt becomes null after execution.

Endpoints

OperationMethodEndpoint
ListGET/api/scheduled-events
CreatePOST/api/scheduled-events
Get by IDGET/api/scheduled-events/{id}
UpdatePUT/api/scheduled-events/{id}
DeleteDELETE/api/scheduled-events/{id}

List Scheduled Events

Retrieve scheduled events with optional filtering.

cURL

curl -X GET "https://console.rocketwavelabs.io/api/scheduled-events?organizationId=ORG_UUID&environmentId=ENV_UUID&page=1&limit=10" \
-H "Cookie: rocketwave_session=YOUR_SESSION_TOKEN"

JavaScript

// Using fetch directly
const response = await fetch('/api/scheduled-events?organizationId=ORG_UUID&environmentId=ENV_UUID', {
credentials: 'include'
});
const data = await response.json();
console.log(data.data); // Array of scheduled events
console.log(data.pagination); // { page, limit, total, totalPages }

MCP

const response = await fetch('https://console.rocketwavelabs.io/api/mcp/tools/call', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
credentials: 'include',
body: JSON.stringify({
name: 'scheduled_events_list',
arguments: {
organizationId: 'ORG_UUID',
environmentId: 'ENV_UUID',
page: 1,
limit: 10
}
})
});

Query Parameters

ParameterTypeRequiredDescription
organizationIdUUIDNoFilter by organization
environmentIdUUIDNoFilter by environment
workflowIdUUIDNoFilter by workflow
workflowEntityIdUUIDNoFilter by workflow entity
pagenumberNoPage number (default: 1)
limitnumberNoItems per page (default: 10, max: 100)

Response

{
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"organizationId": "ORG_UUID",
"environmentId": "ENV_UUID",
"workflowId": "WORKFLOW_UUID",
"workflowEntityId": "ENTITY_UUID",
"scheduleType": "cron",
"cronExpression": "0 9 * * MON",
"timezone": "America/New_York",
"lastRunAt": "2026-01-27T14:00:00Z",
"nextRunAt": "2026-02-03T14:00:00Z",
"createdAt": "2026-01-15T10:00:00Z",
"updatedAt": "2026-01-27T14:00:00Z"
}
],
"pagination": { "page": 1, "limit": 10, "total": 5, "totalPages": 1 }
}

:::note
Schedules with `nextRunAt: null` are completed one-time schedules or disabled schedules. Active schedules always have a future `nextRunAt` value.
:::

Create Scheduled Event

Create a new scheduled event.

cURL (Cron Schedule)

curl -X POST "https://console.rocketwavelabs.io/api/scheduled-events" \
-H "Content-Type: application/json" \
-H "Cookie: rocketwave_session=YOUR_SESSION_TOKEN" \
-d '{
"workflowEntityId": "ENTITY_UUID",
"workflowId": "WORKFLOW_UUID",
"organizationId": "ORG_UUID",
"environmentId": "ENV_UUID",
"scheduleType": "cron",
"cronExpression": "0 9 * * MON",
"timezone": "America/New_York"
}'

cURL (One-time Datetime)

curl -X POST "https://console.rocketwavelabs.io/api/scheduled-events" \
-H "Content-Type: application/json" \
-H "Cookie: rocketwave_session=YOUR_SESSION_TOKEN" \
-d '{
"workflowEntityId": "ENTITY_UUID",
"workflowId": "WORKFLOW_UUID",
"organizationId": "ORG_UUID",
"environmentId": "ENV_UUID",
"scheduleType": "datetime",
"scheduledAt": "2026-02-15T10:00:00Z",
"timezone": "UTC"
}'

JavaScript

// Create a recurring schedule (every Monday at 9am)
const response = await fetch('/api/scheduled-events', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
credentials: 'include',
body: JSON.stringify({
workflowEntityId: 'ENTITY_UUID',
workflowId: 'WORKFLOW_UUID',
organizationId: 'ORG_UUID',
environmentId: 'ENV_UUID',
scheduleType: 'cron',
cronExpression: '0 9 * * MON',
timezone: 'America/New_York'
})
});

MCP

const response = await fetch('https://console.rocketwavelabs.io/api/mcp/tools/call', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
credentials: 'include',
body: JSON.stringify({
name: 'scheduled_events_create',
arguments: {
workflowEntityId: 'ENTITY_UUID',
workflowId: 'WORKFLOW_UUID',
organizationId: 'ORG_UUID',
environmentId: 'ENV_UUID',
scheduleType: 'cron',
cronExpression: '0 9 * * MON',
timezone: 'America/New_York'
}
})
});

Request Body

FieldTypeRequiredDescription
workflowEntityIdUUIDYesThe event entity to trigger
workflowIdUUIDYesThe workflow containing the entity
organizationIdUUIDYesOrganization ID
environmentIdUUIDYesEnvironment ID
scheduleTypestringYesEither cron or datetime
cronExpressionstringConditionalCron expression (required if scheduleType is cron)
scheduledAtstringConditionalISO datetime (required if scheduleType is datetime)
timezonestringNoIANA timezone (default: UTC)

Response (201)

{
"id": "550e8400-e29b-41d4-a716-446655440001",
"organizationId": "ORG_UUID",
"environmentId": "ENV_UUID",
"workflowId": "WORKFLOW_UUID",
"workflowEntityId": "ENTITY_UUID",
"scheduleType": "cron",
"cronExpression": "0 9 * * MON",
"timezone": "America/New_York",
"nextRunAt": "2026-02-03T14:00:00Z",
"createdAt": "2026-01-29T10:00:00Z",
"updatedAt": "2026-01-29T10:00:00Z"
}

Error Responses

StatusDescription
400Missing required fields or invalid cron expression
404Workflow or entity not found
500Internal server error

Get Scheduled Event by ID

Retrieve a single scheduled event by its ID.

cURL

curl -X GET "https://console.rocketwavelabs.io/api/scheduled-events/EVENT_UUID" \
-H "Cookie: rocketwave_session=YOUR_SESSION_TOKEN"

JavaScript

const response = await fetch('/api/scheduled-events/EVENT_UUID', {
credentials: 'include'
});
const event = await response.json();

MCP

const response = await fetch('https://console.rocketwavelabs.io/api/mcp/tools/call', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
credentials: 'include',
body: JSON.stringify({
name: 'scheduled_events_get',
arguments: { id: 'EVENT_UUID' }
})
});

Update Scheduled Event

Update an existing scheduled event.

cURL

curl -X PUT "https://console.rocketwavelabs.io/api/scheduled-events/EVENT_UUID" \
-H "Content-Type: application/json" \
-H "Cookie: rocketwave_session=YOUR_SESSION_TOKEN" \
-d '{
"cronExpression": "0 10 * * MON-FRI",
"timezone": "America/Los_Angeles"
}'

JavaScript

const response = await fetch('/api/scheduled-events/EVENT_UUID', {
method: 'PUT',
headers: { 'Content-Type': 'application/json' },
credentials: 'include',
body: JSON.stringify({
cronExpression: '0 10 * * MON-FRI', // Every weekday at 10am
timezone: 'America/Los_Angeles'
})
});

MCP

const response = await fetch('https://console.rocketwavelabs.io/api/mcp/tools/call', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
credentials: 'include',
body: JSON.stringify({
name: 'scheduled_events_update',
arguments: {
id: 'EVENT_UUID',
cronExpression: '0 10 * * MON-FRI',
timezone: 'America/Los_Angeles'
}
})
});

Request Body

FieldTypeRequiredDescription
scheduleTypestringNoChange between cron and datetime
cronExpressionstringNoNew cron expression
scheduledAtstringNoNew ISO datetime (sets nextRunAt)
timezonestringNoNew timezone
Reactivating a Schedule

To reactivate a completed one-time schedule, update it with a new scheduledAt datetime in the future. This will set the nextRunAt field and make the schedule active again.


Delete Scheduled Event

Permanently delete a scheduled event.

cURL

curl -X DELETE "https://console.rocketwavelabs.io/api/scheduled-events/EVENT_UUID" \
-H "Cookie: rocketwave_session=YOUR_SESSION_TOKEN"

JavaScript

await fetch('/api/scheduled-events/EVENT_UUID', {
method: 'DELETE',
credentials: 'include'
});

MCP

const response = await fetch('https://console.rocketwavelabs.io/api/mcp/tools/call', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
credentials: 'include',
body: JSON.stringify({
name: 'scheduled_events_delete',
arguments: { id: 'EVENT_UUID' }
})
});

Response

{
"success": true
}

Cron Expression Reference

Cron expressions use the standard 5-field format:

┌───────────── minute (0-59)
│ ┌───────────── hour (0-23)
│ │ ┌───────────── day of month (1-31)
│ │ │ ┌───────────── month (1-12)
│ │ │ │ ┌───────────── day of week (0-6, Sunday = 0)
│ │ │ │ │
* * * * *

Common Examples

ExpressionDescription
0 9 * * MONEvery Monday at 9:00 AM
0 9 * * MON-FRIEvery weekday at 9:00 AM
0 */2 * * *Every 2 hours
0 0 1 * *First day of every month at midnight
30 8 * * 1,3,5Mon, Wed, Fri at 8:30 AM
0 9-17 * * MON-FRIEvery hour 9-5 on weekdays

Timezone Support

Use IANA timezone identifiers for the timezone field:

  • America/New_York
  • America/Los_Angeles
  • America/Chicago
  • Europe/London
  • Europe/Paris
  • Asia/Tokyo
  • UTC (default)

See the full list at IANA Time Zone Database.