Interval Job
  • 15 Dec 2021
  • 2 Minutes to read
  • Dark
    Light

Interval Job

  • Dark
    Light

Article Summary

Overview

An Interval Job is a type of Scheduled Job that allows a user to pick a Flow and run it a defined number of times with a provided interval (as a timer). 

An Interval Job sets the interval or the time span between when a job should be run via the Interval control. By using the Count inputusers are able to set how many times the Flow should be run.

 If a user wanted to run a specified Flow 2 times in 15-minute intervals, an Interval Job would be beneficial.

A Scheduled Job sets the time and day that a Flow is run. There are pre-set Calendar settings to help, such as setting the flow to run on the first or last day of the month.

The Scheduled Job can also use the TimeSpan control, but only if a user sets the Calendar control to TimeSpan Schedule.

If a user wanted to run a specified Flow on a daily or a weekly schedule, this would be the best method to do so.

Example

The following example demonstrates how to set up an Interval Job that is configured to send an Email.  
  1. From a Designer Project, click CREATE FLOW on the Global Action Bar. Select Flow, provide a Name, then click CREATE.
  2. From the Flow Designer, add a Send Email steps from the FAVORITE STEPS category, of the Properties tab on the left. Connect this step to the Start and End steps. 
  3. Select the Send Email step to navigate to its Properties tab.; configure the EMAIL Properties.
    1. Constant map an Email address into the From and To Properties respectively. 
    2. Map the desired Email Subject and Body
  4. Save the Flow, then close via X.
  5. From the Studio Portal, navigate to System > Jobs and Events > Scheduled Jobs
  6. From the Folder's Global Action Bar, select Add Interval Job. 
  7. From the Add Interval Job window, define the Job Name, then click PICK FLOW; select the previously created Email Flow, then PICK.
  8. Set the Count to 3, then set the Interval to 5 Minutes, then click SAVE.  These configurations will trigger the Interval Job to run 3 times, every 5 minutes,  if desired, the Thread Queue Name may be changed and the Job can be configured to Only Run on Job Server.
    Interval Jobs Running in a Clustered Environment
    Interval Jobs work differently from Scheduled Jobs within a Clustered Environment. Interval Jobs will run on all cluster nodes unless the 'Only Run on Job Server' boolean is enabled. This option will allow Interval Jobs to run on one active job server but still offers a fallback option if there are multiple servers that are set as can be job servers. If the 'Only Run on Job Server' boolean is not enabled, then jobs will run on all cluster nodes if not properly configured, which can result in duplicate executions.

  9. Navigate to the INTERVAL JOBS tab to verify that the Job has been defined. The Interval Job may be edited or deleted by right-clicking the Job and utilizing its Action menu.


  10. Wait for the amount of time defined by the Interval property, then navigate to the inbox of the To address to verify that the Job sends the Email three times.
    12_received.png


Was this article helpful?