Skip to main content

Is it possible to run  schedule -triggered lightning flow twice a week? If it is possible, how we can do it? Only once, daily and weekly frequencies are available at schedule -triggered lightning flow.

 Is it possible to run schedule -triggered lightning flow twice a week?

8 respuestas
  1. Eric Praud (Activ8 Solar Energies) Forum Ambassador
    16 feb 2022, 8:04

    Hi,

     

    You have 3 options:

    1-Create 2 scheduled flows, runninng weekly, on the required day

    2-Create a formula field on the object returning a checkbox that will be checked twice a week, then as an entry criteria in your flow, write checkbox Equals $GlobalConstant.TRUE. The flow has to run every day

    The formula can be like so (Let's say you want it to run on Monday and Friday):

    OR(WEEKDAY(TODAY())=2, WEEKDAY(TODAY())=6)

    3-Create a formula resource in the flow returning a boolean with a similar formula as above for a flow running every day:

    OR(WEEKDAY({!$Flow.CurrentDate})=2, WEEKDAY({!$Flow.CurrentDate})=6)

     

    Then add a Decision straight after your start element to check if Formula Equals $GlobalConstant.TRUE. If it does, keep going in your flow, if not, just stop

     

    To me, the 2nd solution would be the best since you only have to administer 1 flow and it would only trigger on the right dates, as opposed to solution #3 where your flow would trigger every day, for every record but woudln't do anything since it woudl stop at the decision

0/9000