Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In this article

Table of Contents
maxLevel3
absoluteUrltrue

Overview

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:

Known Issue

  • When creating a Task and selecting the America/Mexico City time zone, the task runtime is off by one hour. Since Mexico City no longer observes daylight savings, the current implementation of CDT (aligned with CST) might assume that Mexico City changed time zones as it did in the past.
    Workaround: Upgrade your Snaplex to a JDK 11.0.18+ version.

  • The end time of the Scheduled Task, when selected under Date/Time, can erroneously be set earlier than the Start time.

Creating a Scheduled Task

  1. Open the Create Task dialog window using one of the following methods:
    • In Designer, click Image Removed to expand click the toolbar , click Image Removed  to display the drop-down menu, and then select  Create Task button, select Task > Scheduled Task to display the Create Task dialog window:
      Image Removed.
      Image Added

    • In Manager, navigate to the target Project, click  to display the drop-down menu, and then select Task > Scheduled Task to display the dialog window.
      Image RemovedImage Added

  2. In the Create Task dialog window, make the following required options:
    • Name: Enter a name for the scheduled Pipeline Task.
      This name is used in the URL when the Pipeline has unconnected inputs/outputs. 

      Note

      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.
    • Snaplex: Select the Snaplex on which to run the Pipeline from the Snaplex drop-down menu. 


  3. Configure the schedule for this Task.
    1. Enter a Start Day/Time, and edit the Time Zone setting if required. Proceed to Step 4 if this Scheduled Task is a one-time execution.
    2. Select the Repeat Execute the pipeline on a regular schedule box to view the scheduling options for specifying how often the associated Pipeline should be run. 

  4. If applicable, modify the Configuration Options in the dialog window, and click Save.

Viewing Task Details

After you create and enable a Scheduled Task, you can view details about the Task. 

  1. Open the Task Details page for your Scheduled Task by clicking View Details.


  2. On the Task Details page, view Pipeline execution information for any scheduled instance by clicking Run Details.


  3. Navigate to the Dashboard Pipeline Wall to monitor the scheduled execution of the Task.
Scheduling Sequential Task Runs

Setting a Repeatable Schedule

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.

Multiexcerpt macro
nameDuplicate Executions


Duplicate Task Executions

If a Task fails to start with the same reason for multiple times in a row, then subsequent skips are not displayed on the Task details page.


Grace Period for Scheduled Tasks

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.
Image Added

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.

Image Added

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.

Image Added


Info

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.


Time Zones 

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.

Note
titleBest Practice

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.

For example, if you create a Scheduled Task in the United States that executes every day at 2:37 AM, then at 2 AM on the day when Daylight Savings Time (DST) starts, the Scheduled Task execution is skipped, since clocks would have automatically moved forward to 3 AM (because 2:37 AM does actually not occur that day). 

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.

Run Frequency

You can define the task run frequency. Use the Repeat By setting to select when to execute the Pipeline.

  • Minutes: Select how often the Pipeline should be executed in minutes (1–59) from the Every (Minutes) drop-down list. For example, you can run a Scheduled Task every 13 minutes.
  • Hours: Select how often the Pipeline should be executed in hours (0–24) from the Every (Hours) drop-down list. For example, you can run a Scheduled Task every 9 hours.
  • Days: Select how often the Pipeline should be executed in days (1–90) from the Every (Days) drop-down list. For example, you can run a Scheduled Task every 45 days.
  • Weeks: Select how often the Pipeline should be executed in weeks (1–52) from the Every (Weeks) drop-down list.
    • Days of the Week: You can also specify which days of the week your Scheduled Task executes. 
  • Months: Select how often the Pipeline should be executed in months (1–6) from the Every (Months) drop-down list.
    • Days of the Month: You can also specify the days of the month on which your Scheduled Task executes. This includes the following options:
      • Dates of the month. For example, you can run a Scheduled Task on the 12th and 24th of every month.
      • Days of the month (1st, 2nd, 3rd, 4th, 5th, Last). For example, you can schedule a task to run every third Wednesday of the month.
  • Years: Select how often the Pipeline should be executed in years (1-4) from the Every (Years) drop-down list.
  • Cron: Select how often the Pipeline should be executed in a Cron schedule. See Cron Schedule for details.

Example Schedule

End of Schedule

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

schedule
  • run the Scheduled Task

executions
  • for an indeterminate time. Scheduled Task

executions
  • 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

. You can
  • , 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.


Info

When the limit is reached, click the Reset the counter to 0 checkbox to re-activate scheduled

executions

pipeline runs.

  • On Date/Time. Select this option to choose from the picker the date and time
when
  • that the Scheduled Task
executions
  • should end
from the selector
  • .


Blackout Dates

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. 

Cron Schedule

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.

Guidelines

  • Selecting Every in a column overrides the specific periods selected.
  • 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.

    Info
    titleCRON Schedule Increments

    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 make multiple selections with a column, press CTRL/COMMAND, then click on the target entries in the column.
    • To run the Task in increments of 6 minutes every hour, then select Any for Hour, then specify each period of 6 minutes (:00, :06, :12, :18, [...] :54) within that hour. 

To schedule a cron task for the Nth day of the week (for example 3rd Tuesday)

  1. In the Create Task window, click Settings tab.

  2. In the Scheduling area, select the Start Date, Start Time and Time Zone.

    Image Added
  3. In the Repeat by drop-down list, select Cron.

  4. In the Month column, select a preferred month.

  5. In the Day column do the following:

    1. Select the Nth day of the week. For example, select Third Tuesday.

    2. Unselect Every Day.

  6. In Day Of Week column do the following:

    1. Select Every Day of Week.

    2. Unselect any other selection.

  7. Select other suitable options.

  8. Click Save.

Example Cron Schedule by Settings

ExampleMonthDayDay of WeekHourMinute

Every day at 12:01 AM

EveryEveryEvery12AM:01
Every weekday at 9 PMEveryEveryMonday, Tuesday, Wednesday, Thursday, Friday9PM:00
Every 5 minutes but only in the morning of Friday & SaturdayEveryEveryFriday & Saturday12AM, 1AM, [...], 10AM, 11AM:00, :05, :10, [...], :50, :55


Configuration Options

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.

Timeouts

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.

Notifications

You can create email notifications based on the status of the Scheduled Task . If your Org supports Slack notifications, you can and add Slack channels or recipients if your organization supports Slack notifications

To add recipients for Task notifications:

  • In Notifications, enter each recipient's email address, separated by commas.

  • If Slack notifications are configured for your Org, then the following fields support dropdown lists containing your Slack channels and users. For each field, you can also type to invoke suggested recipients in the field. 

    • Direct Message(s). Select Slack recipients from the dropdown list. 

    • Channels. Select Slack channels as recipients from the dropdown list.

Recipients receive notifications based on the selections in the When Task has field.

Image Added

  • Select the status

event
  • events for which Notifications are sent from the When Task has selector:

    • Started. The Task is activated.

    • Completed. The Task is completed.

    • Failed.

The
    •  The associated

Pipeline
    • pipeline did not execute.

    • Stopped. The associated Pipeline has stopped abruptly, and the Task is no longer running.

    • Suspended. Select if you want to receive a Notification if the Task is based on a Resumable Pipeline that is in a Suspended state.

Recipients receive notifications based on the selections in the When Task has field.

    • Delayed. The Task, and hence, the associated pipeline did not start at the scheduled time. You can define the wait time threshold (Delayed by) in minutes or seconds that the Control plane waits before sending out the Delayed Task email/Slack notifications.
      Image Added

Change the Run Policy

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.


Stopping a Scheduled Task

To stop a Scheduled Task:

  1. Navigate to the target project folder with the Scheduled Task.

  2. In the Assets view, click Tasks on the Assets toolbar menu

  3. Select the target Scheduled Task, and then click Disable.

  4. Verify that the Task executions stopped:
    1. Place the cursor on the Task in the assets view, and click to display the menu.
    2. Select View Details and view Task Status

Editing a Scheduled Task

To edit the Scheduled Task:

  1. In Manager, select Scheduled Tasks from the Settings menu on the right.

  2. Click the Scheduled Task name to display the Update Task dialog window.  

  3. Modify the configuration options, and click Update.
Info

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.