You can create a Scheduled Task after you have created a Pipeline in SnapLogic Designer. When you create a Scheduled Task in Designer, the Pipeline is pre-selected when you open the Create Task dialog window. You also have the option to create a Task in Manager. When you create a Scheduled Task in Manager, you must select a Pipeline to associate with the Scheduled Task. You can choose from a variety of scheduling options to schedule executions of that Pipeline. If you create the Scheduled Task with the default scheduling settings intact, the Pipeline is scheduled to execute five minutes from the time you open the dialog window.
Creating a Task includes the following tasks and topics:
The end time of the Scheduled Task, when selected under Date/Time, can erroneously be set earlier than the Start time.
Name: Enter a name for the scheduled Pipeline Task.
This name is used in the URL when the Pipeline has unconnected inputs/outputs.
The names of assets, projects, or project spaces are limited to UTF-8 alphanumeric characters and these special characters: |
Pipeline: Select the Pipeline associated with the Scheduled Task from the Pipeline drop-down menu.
This Pipeline is triggered when the Scheduled Task is activated.After you create and enable a Scheduled Task, you can view details about the Task.
Schedeuled Tasks enable you to schedule pipeline runs on a repeatable schedule.
You can prevent a Pipeline from running again if a previous execution of that Pipeline is already running. The Do not start a new execution if one is already active option forces the sequential execution of the scheduled Pipeline.
A three-month limit is placed on the Do not start a new execution if one is already active option. A second instance of that Pipeline is able to execute after the three-month period.
|
A Scheduled Task sometimes does not run the associated pipeline at a scheduled instance. In this article, these missed Scheduled Tasks are called misfires. For pipelines scheduled to run daily or hourly, Scheduled Tasks have a grace period of 15 minutes after a task is scheduled to execute. If a Scheduled Task fails to run as scheduled, it still has a 15-minute grace period to run the pipeline from when it is scheduled.
This grace period counts for the first scheduled instance of the pipeline run. For example, if a Scheduled Task is set to run at 9 AM local time, but you disable the task at 8 AM and re-enable the task at 9:10 AM, the Scheduled Task runs, because it considers the grace period of 15 minutes from when it was scheduled to run.
After September 2023, the misfire threshold has more granularity in its misfire threshold for scheduled intervals of less than 15 minutes. When the misfire threshold has been passed, the missed tasks are marked as failed.
If the task is scheduled to run every 15 minutes, the grace period is 5 minutes. The image below shows that a task that runs every 15 minutes has a misfire when scheduled to run at 8:30. However, because the task misses the 5-minute grace period, it never runs within the scheduled interval after the failure, and the interval is skipped. Instead, the task runs 15 minutes after the last planned schedule.
If the task is scheduled to run every 5 minutes, the grace period is one and a half minutes. The image below shows that a task that runs every 5 minutes has two failures before the task is run within the 1.5-minute grace period.
If the task is scheduled to run every 1 minute, the grace period is thirty seconds. The image below shows that a task that runs every minute has two failures before the task is run within the 1.5-minute grace period.
In some cases with tasks scheduled in short interval (less than 5 minutes), the UI only shows one misfire when multiple misfires actually occurred. If you view the Snaplex JCC node logs, the misfires are recorded correctly. |
Scheduled Task times and blackout dates are based on the value you set in the Time zone field. The time zone selector contains 595 time zones from which to choose. Included are time zones affected by daylight savings. On the day when the locale time moves ahead by one hour, Scheduled Tasks that are scheduled to run during the time change window are automatically started one hour later.
This behavior prevents a task from being skipped that day. On the following day, these Scheduled Tasks resume their normal schedule. For example, on the day when Pacific Daylight Time (PDT) begins and the time changes from 2:00 AM to 3:00 AM, any task that is scheduled to start between 2:00 am and 3:00 AM is automatically started one hour later.
We recommend using caution when scheduling Scheduled Tasks between midnight and 3:00 AM and take into consideration Daylight Savings. Because Scheduled Tasks can trigger Pipeline executions based on the time of day, the Daylight Savings time shift can cause the Task executions scheduled during this window of time to be skipped or to be executed more than once. Similarly, if you create a Scheduled Task to execute every 15 minutes of every hour, every day, then on the day when Daylight Savings time ends, there is a window of time during which the Task does not execute: because at 2:00 AM Standard Time, when the clock reverts to 1:00 AM, those Scheduled Task executions between 1:00 AM and 2:00 AM would have already occurred, resulting in an hour without any Scheduled Task executions. |
You can define the task run frequency. Use the Repeat By setting to select when to execute the Pipeline.
You can specify the lifespan of your Scheduled Task.
Select one of the following options for ending your Schedule Task:
Never. Select this option to run the Scheduled Task for an indeterminate time. Scheduled Task runs never stop as long as the Snaplex where the Pipeline runs remains online.
After # of Runs. Select this option to specify the number of Scheduled Task executions, and enter the number of Scheduled Task executions before the schedule ends in the Runs field.
Minimum: 1
Maximum: 10000000
If you enter an invalid number (for example, -3
or 9999999999.99
), the dialog displays an error.
When the limit is reached, click the Reset the counter to 0 checkbox to re-activate scheduled pipeline runs. |
For repeat, Scheduled Tasks, you can set Blackout dates for times when you do not want the task to run. Click to add one or more blackout dates. Blackout dates are based on the Time zone that you set for the task.
You can schedule Task executions to repeat on a regular time-based schedule by selecting Cron. A Cron schedule provides more granularity. The following example illustrates the various scheduling options.
If you select values for both Day and Day of Week, then the target day must meet both criteria. For example, 1st and Monday means on the month where the 1st day of that month is a Monday.
If you need different Pipeline run schedules based on the day of the week, create multiple Scheduled tasks (Regular or Cron).
If you need to run the Pipeline every 30 minutes, click Every for Month, Every for Day, Every for Day of Week, Every for Hour, then press CTRL/COMMAND (depending on your Operating System) and click :00 and :30.
The Cron scheduler requires to set a point of reference when selecting increments of minutes, so that :00 is always a required starting point to make selections of less than one hour. |
If you select Minute, then the job runs at the target minute on every hour. Example: selecting :02 minutes sets the schedule at every hour after 2 minutes. The job does not run every 2 minutes within that hour.
To schedule a cron task for the Nth day of the week (for example 3rd Tuesday)
In the Create Task window, click Settings tab.
In the Scheduling area, select the Start Date, Start Time and Time Zone.
In the Repeat by drop-down list, select Cron.
In the Month column, select a preferred month.
In the Day column do the following:
Select the Nth day of the week. For example, select Third Tuesday.
Unselect Every Day.
In Day Of Week column do the following:
Select Every Day of Week.
Unselect any other selection.
Select other suitable options.
Click Save.
Example | Month | Day | Day of Week | Hour | Minute |
---|---|---|---|---|---|
Every day at 12:01 AM | Every | Every | Every | 12AM | :01 |
Every weekday at 9 PM | Every | Every | Monday, Tuesday, Wednesday, Thursday, Friday | 9PM | :00 |
Every 5 minutes but only in the morning of Friday & Saturday | Every | Every | Friday & Saturday | 12AM, 1AM, [...], 10AM, 11AM | :00, :05, :10, [...], :50, :55 |
You can configure Timeouts and Notifications for your Scheduled Tasks. You can also change the run policy, though doing so changes how the Pipeline is invoked.
You can add Pipeline timeouts to Scheduled Task executions that occur frequently in a short period of time. To configure the maximum duration that a Pipeline is allowed to run, enter the number of minutes in the Timeout field. The Scheduled Task stops executing after the specified timeout duration is reached. The minimum timeout duration for a Pipeline is one minute. If you leave the field empty, the timeout is zero, which is equivalent to no timeout.
You can create email notifications based on the status of the Scheduled Task. If your Org supports Slack notifications, you can add Slack channels or recipients.
To add recipients for Task notifications:
Recipients receive notifications based on the selections in the When Task has field.
When you create a Scheduled Task, Scheduled is the chosen Run Policy by default.
If you change the Run Policy of a Scheduled Task to Triggered or Ultra, the underlying Task type is modified. In such cases, you must re-configure the Task.
To stop a Scheduled Task:
To edit the Scheduled Task:
A Scheduled Task can take up to 10 minutes past the scheduled time to execute. If it misses that window, the Task does not execute. |