PermuteDocs
Go to Permute

Operations · operationsUpdate

Schedule, pause, or resume an operation

Updates schedule or isEnabled without executing or publishing. All schedule times are UTC; weekly dayOfWeek uses Sunday=0. Null or manual clears the schedule. Pausing preserves the schedule and clears nextRunAt. Scheduled runs use published code. Configure Data Flow scheduling on its parent operation, not individual children.

PATCH/v1/operations/{operationId}
betaapiKeyworkspace

When to use

Schedule a published operation or Data Flow, or pause and resume it.

For agents

All times are UTC (weekly dayOfWeek uses Sunday=0). Send only the fields you want to change. Use isEnabled: false to pause while keeping the schedule, isEnabled: true to resume, or schedule: null to return to manual runs. Publish first: scheduling does not publish draft code. Use the parent operation ID for a Data Flow.

Example

typescript
import { PermuteClient } from '@permute/sdk';

const orgClient = new PermuteClient({
  apiKey: process.env.PERMUTE_API_KEY!,
});

const client = orgClient.withWorkspace(process.env.PERMUTE_WORKSPACE_ID!);

const result = await client.operations.update('oper_revenue123', {
  "schedule": {
    "type": "daily",
    "hour": 8,
    "minute": 0
  },
  "isEnabled": true
});

Request body

json
{
  "schedule": {
    "type": "daily",
    "hour": 8,
    "minute": 0
  },
  "isEnabled": true
}

Response

json
{
  "data": {
    "id": "oper_revenue123",
    "name": "Revenue by customer",
    "kind": "dataTable",
    "instructions": "Sum revenue by customer.",
    "dataSourceIds": [
      "data_abc123"
    ],
    "parentDataFlowId": null,
    "status": "active",
    "codeStale": false,
    "schedule": {
      "type": "daily",
      "hour": 8,
      "minute": 0
    },
    "isEnabled": true,
    "nextRunAt": "2026-09-12T08:00:00.000Z",
    "draft": {
      "revisionId": "rvsn_code123",
      "sequence": 1
    },
    "published": {
      "revisionId": "rvsn_code123",
      "sequence": 1
    }
  }
}