Schedule data generation jobs

Included in the Basic API

From the Tonic Structural API, you can set up a schedule to run data generation for a workspace. The schedule consists of one or more configurations. Each configuration uses a cron expression to specify the schedule.

For an overview of the cron expression syntax, go to Scheduling data generation.

Getting the current job schedule for a workspace

To get the current schedule for a workspace, use:

GET /api/workspace/{workspaceId}/JobSchedule

The request includes:

  • The type of schedule (always DataGeneration)

  • Optionally, the number of configurations to include in the response.

The response contains the list of job configurations. Each job configuration includes:

  • The type of configuration (always Cron)

  • The cron expression

  • The time zone for the configuration

  • Whether the configuration is active

  • When the configuration was created and most recently updated

  • The users who created and most recently updated the configuration

Updating the job schedule for a workspace

When you update a job schedule, you provide a new set of schedule configurations. The provided schedule configurations replace the existing schedule configurations for the workspace.

To update the job schedule for a workspace, use:

POST /api/workspace/{workspaceId}/JobSchedule

Each schedule configuration includes:

  • The type of configuration (always Cron)

  • The cron expression

  • The time zone for the configuration

  • Whether the configuration is active

Removing the job schedule for a workspace

To remove the schedule completely from a workspace, use:

DELETE /api/workspace/{workspaceId}/JobSchedule

When you delete a job schedule, you specify the type of schedule (always DataGeneration).

Last updated