Running a Flow as a Scheduled Job
  • 01 Oct 2024
  • 3 Minutes to read
  • Dark
    Light

Running a Flow as a Scheduled Job

  • Dark
    Light

Article summary

Overview

To capture or transform data on a regular basis, Flows can be set to run on an hourly, daily, weekly, or monthly schedule using the Scheduled Jobs feature. 


Example

The following example will demonstrate how to configure a Scheduled Job Flow to run an existing Flow using a TimeSpan schedule. 

  1. In the Decisions Studio, select a Project and navigate to Manage > Jobs And Events > Scheduled Jobs and click NEW SCHEDULED FLOW.
  2. On the New Scheduled Flow window, enter "Example Scheduled Job" in the Name field under the SCHEDULED JOB INFO category. Under Flow Job Information, click PICK OR CREATE FLOW. Click PICK and select an existing Flow to use.
  3. Under Schedule Configuration, in the Calendar drop-down dialog, select the Time Span Schedule option. A TimeSpan schedule sets a job to run regularly, with the interval defined between each instance.
  4. Navigate to the CALENDAR INFORMATION category under TimeSpanSchedule Information, and select Immediately in the RunWhen drop-down list. To set the time span between each job, use the slider control or enter a value in the Seconds, Minutes, Hours, and Days. Select SAVE once complete.

    The Time Span Schedule option sets the time span to 30 seconds by default. Scheduled Jobs using the TimeSpan Schedule will not save if the TimeSpan is less than 30 seconds. 
  5. The Scheduled Job will appear on the SCHEDULED JOBS page in a list. Right-click the name of the Job to access options in the action menu.

Schedule Job Properties

Once a scheduled job is created, users are able to edit the scheduled job to view more properties. To view these properties, right-click a scheduled job and select Edit Schedule Job.

Edit Job Settings

PropertyDescription
Start DateSets the job's start date/time.
Specify ExpirationSets the job's desired Expiration date .
Run Job on StartupConfigures the Schedule job to start once the User logs into the Decision Instance.
Schedule Job NameSpecifies the Schedule Job name to distinguish between other jobs.
DescriptionContains the Schedule Job Description to further distinguish between other jobs.
No. of AttemptsSets the number of times a scheduled job will run if there are any failures (default is 0, which represents infinite attempts).
Assign Failure to UserAllows users to select an assigned user that will receive a task when there is a failed job.
Requeue Failed ActionAllows the failed action to be added back into the queue of scheduled jobs.
Create Task on Job FailureAllows a task to be assigned to the Assign Failure to User user when the job fails.
Respect Schedules In FolderAllows the job to be configured based on existing schedules in a folder. The Pick Folder with Schedule option displays for a user to pick the desired folder.

Edit Job Info

Flow Input Data allows a user the ability to declare input data for selected Scheduled Job Flows that are configured to expect it.

PropertyDescription
PICK OR CREATE FLOWSpecifies the Flow that runs during the scheduled time.
Input DataDeclares data to be supplied as input to the Flow (option will display only if selected Flow expects input).

Calendar Info Settings

This section contains the configuration settings for the selected Calendar setup when the Schedule job was created. This section will vary based on which Calendar selection was made. This example has the TimeSpan Schedule configuration settings displayed.

The different Calendar selections are:

  • Daily Schedule
  • First Day of Month Schedule
  • Last Day of Month Schedule
  • Monthly Schedule
  • Specified Job Schedule
  • Time Span Schedule
  • Weekly Schedule
  • Yearly Schedule

Setting Boundaries Time Span Schedules

Specifically for Time Span Schedules, a Time Boundary can be configured, preventing jobs from running outside of the specified time span. 

To use this setting, check BetweenHours under Calendar Information > Time Span Schedule Information. Configure the Start/End times using the Time Picker controls. 

If the Scheduled Job would be executed before or after the defined Start/End times, the jobs will be rescheduled and executed on the StartTime.



Was this article helpful?