Back to Content Management API

scheduleUpdate

Updates a schedule.

Arguments

  • Name
    id
    Type
    ID!
    Description

    The ID of the schedule to update.

  • Name
    input
    Type
    UpdateScheduleInput!
    Description

    An object.

    • title: String
    • description: String
    • executeAt: DateTime
    • timezone: String
    • content: [ContentToSchedule!]

Returns

  • Name
    Schedule.*
    Type
    Schedule
    Description

    Any requested field from the Schedule object.

Request

import { PackClient } from '@pack/client'
const packClient = new PackClient({
  token: 'YOUR-PACK-TOKEN'
});

const query = `
  mutation ScheduleUpdate($id: ID!, $input: UpdateScheduleInput!) {
    scheduleUpdate(id: $id, input: $input) {
      id
      title
      description
      executeAt
      timezone
      state
      content {
        __typename
        ... on Page {
          id
          title
          handle
        }
        ... on Section {
          id
          title
        }
      }
    }
  }
`;

const variables = {
  id: 'YOUR-SCHEDULE-ID',
  input: {
    title: 'Holiday launch',
    description: 'Publish the holiday homepage and hero section',
    executeAt: '2026-11-27T08:00:00Z',
    timezone: 'America/New_York',
    content: [
      { contentId: 'YOUR-PAGE-ID', contentType: 'page', action: 'publish' },
      { contentId: 'YOUR-SECTION-ID', contentType: 'section', action: 'publish' }
    ]
  }
};

const response = await packClient.fetch(query, { variables: variables });
console.log(response.data);

Response

{
    "data": {
        "scheduleUpdate": {
            "id": "YOUR-SCHEDULE-ID",
            "title": "Holiday launch",
            "description": "Publish the holiday homepage and hero section",
            "executeAt": "2026-11-27T08:00:00Z",
            "timezone": "America/New_York",
            "state": "scheduled",
            "content": [
                {
                    "__typename": "Page",
                    "id": "YOUR-PAGE-ID",
                    "title": "Holiday Homepage",
                    "handle": "holiday"
                },
                {
                    "__typename": "Section",
                    "id": "YOUR-SECTION-ID",
                    "title": "Holiday Hero"
                }
            ]
        }
    }
}

Was this page helpful?