{#if edit}
{ await ScheduleService.setScheduleEnabled({ path: initialPath, workspace: $workspaceStore ?? '', requestBody: { enabled: e.detail } }) sendUserToast(`${e.detail ? 'enabled' : 'disabled'} schedule ${initialPath}`) }} />
{/if}

Metadata

{ if (!edit && summary?.length > 0 && !dirtyPath) { pathC?.setName( summary .toLowerCase() .replace(/[^a-z0-9_]/g, '_') .replace(/-+/g, '_') .replace(/^-|-$/g, '') ) } }} />
{#if !edit} {:else}
Schedule path (not editable) { currentTarget.select() }} />
{/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 itemKind == 'flow'} {/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}
{#if !is_flow}{/if}
Error Handler Recovery Handler {#if itemKind === 'script'} Retries Custom tag {/if}
{#if optionTabSelected === 'error_handler'}
{#if !$enterpriseLicense}(ee only){/if}
saveAsDefaultErrorHandler(false) }, { 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.

Triggered when schedule failed

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

{:else if optionTabSelected === 'recovery_handler'}
{#if !$enterpriseLicense}(ee only){/if}
saveAsDefaultRecoveryHandler(false) }, { 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' : ''}

{:else if optionTabSelected === 'retries'}
{#if !$enterpriseLicense}(ee only){/if}
If defined, upon error this schedule will be retried with a delay and a maximum number of attempts as defined below.
This is only available for individual script. For flows, retries can be set on each flow step in the flow editor.
{:else if optionTabSelected === 'tag'}
{/if}