{#if edit}
{ await ScheduleService.setScheduleEnabled({ path: initialPath, workspace: $workspaceStore ?? '', requestBody: { enabled: e.detail } }) sendUserToast(`${e.detail ? 'enabled' : 'disabled'} schedule ${initialPath}`) }} />
{/if}
{#if !edit}
{/if}
Schedules use CRON syntax. Seconds are mandatory.
{#if !edit}

Pick a script or flow to be triggered by the schedule

{:else} Once a schedule is created, the runnable path cannot be changed. However, when renaming a script or a flow, the runnable path will automatically update itself.
{/if}
{#if runnable} {#if runnable?.schema && runnable.schema.properties && Object.keys(runnable.schema.properties).length > 0} {:else}
This {is_flow ? 'flow' : 'script'} takes no argument
{/if} {:else}
Pick a {is_flow ? 'flow' : 'script'} and fill its argument here
{/if}
saveAsDefaultErrorHandler(false) }, { disabled: emptyString(errorHandlerPath), displayName: 'Override all existing', type: 'delete', action: () => saveAsDefaultErrorHandler(true) } ]} > Set as default
The following args will be passed to the error handler:
  • path: The path of the script or flow that failed.
  • is_flow: Whether the runnable is a flow.
  • schedule_path: The path of the schedule.
  • error: The error details.
  • failed_times: Minimum number of times the schedule failed before calling the error handler.
  • started_at: The start datetime of the latest job that failed.

{#if !$enterpriseLicense}(ee only){/if} Triggered when schedule failed

time{failedTimes > 1 ? 's in a row' : ''}

{#if !$enterpriseLicense}(ee only){/if}
saveAsDefaultRecoveryHandler(false) }, { disabled: emptyString(errorHandlerPath), displayName: 'Override all existing', type: 'delete', action: () => saveAsDefaultRecoveryHandler(true) } ]} > Set as default
The following args will be passed to the recovery handler:
  • path: The path of the script or flow that recovered.
  • is_flow: Whether the runnable is a flow.
  • schedule_path: The path of the schedule.
  • error: The error of the last job that errored
  • error_started_at: The start datetime of the last job that errored
  • success_times: The number of times the schedule succeeded before calling the recovery handler.
  • success_result: The result of the latest successful job
  • success_started_at: The start datetime of the latest successful job

Triggered when schedule recovered

time{recoveredTimes > 1 ? 's in a row' : ''}