Use Flow Schedule Formulas

Use the Fast Formulas page to create a scheduling formula to define a schedule to submit the flow at a predefined date, frequency, and time to suit your requirements.

Consider the following when you are creating or updating a schedule formula.
  • Specify a meaningful name for the schedule formula so that the person using the formula can easily identify and select it.

  • Review the formula to avoid negative numbers that can lead to an error condition, such as running a process continually.

  • After you update the formula, cancel any scheduled flows that use the formula and then resubmit the flow to apply the updated schedule formula.

This table lists the database items are available to Flow Schedule formulas.

Database Item

Data Type

Description

FF_ADD_DAYS

Date

Function to add days to a date.

FF_ADD_MONTHS

Date

Function to add months to a date.

NEXT_SCHEDULED_DATE

Date

Calculated value for the date to schedule the next flow.

SCHEDULED_DATE

Date

Date used to schedule the flow.

This table provides details of the input variable available to Flow Schedule formulas.

Input Variables

Data Type

Required

Description

SCHEDULED_DATE(DATE)

Date

Y

Date on which to schedule the flow. The date is passed to the formula when it calculates the next date to schedule the flow.

Use predefined names for return variables. This table provides details of return value available to Flow Schedule formulas.

Return Values

Data Type

Required

Description

NEXT_SCHEDULED_DATE

Date

Y

The date calculated by the formula to schedule the next flow.

This predefined formula schedules a flow so that it's submitted weekly from the date the flow owner initially submitted it.

/***********************************************************
FORMULA NAME: Weekly
FORMULA TYPE: Flow Schedule 
DESCRIPTION: Formula to return a date time. 
Returns NEXT_SCHEDULED_DATE; 
Formula Results : 
NEXT_SCHEDULED_DATE This is a date time value with yyyy-MM-dd HH:mm:ss format.
************************************************************/
/* Inputs  */
INPUTS ARE SUBMISSION_DATE(DATE), SCHEDULED_DATE(DATE)
/* Calculations */
NEXT_SCHEDULED_DATE = ADD_DAYS(SCHEDULED_DATE,7)
/* Returns */
RETURN NEXT_SCHEDULED_DATE 
/* End Formula Text */

You can calculate units smaller than a day by replacing the calculation portion of the formula text using a decimal or a fraction. Let’s look at some examples of submitting a flow several times a day.

Flow Submission

Formula Text for Calculation

Twice a day

NEXT_SCHEDULED_DATE =ADD_DAYS(SCHEDULED_DATE,0.5)
Note:

For accuracy, enter a value with at least ten decimal places. The formula text supports a maximum of 14 decimal places.

Hourly

NEXT_SCHEDULED_DATE =ADD_DAYS(SCHEDULED_DATE,1/24)