Chuyển đến nội dung

Bài 8 · Flows and Triggers

Scheduled Flows: The Recurrence Trigger and Time Zones

Create scheduled cloud flows with the Recurrence trigger: intervals, frequencies, start times, time zones, weekdays and hours, delay actions and common timing pitfalls.

A scheduled cloud flow runs on a clock. It suits reports, reminders, clean-up jobs and data synchronization: any work that should happen whether or not something else triggered it.

The Recurrence trigger

Create a Scheduled cloud flow and set Starting, Repeat every and the unit, or add the Recurrence trigger yourself. Its fields:

Field Meaning
Interval The number, such as 1 or 15
Frequency Second, Minute, Hour, Day, Week or Month
Time zone The zone the schedule uses
Start time An ISO time such as 2025-03-03T07:00:00Z
On these days Weekdays, when frequency is Week
At these hours / minutes Exact hours and minutes, for Day and Week

Examples:

  • Every weekday at 7:30: frequency Week, interval 1, days Monday to Friday, hours 7, minutes 30.
  • Every 15 minutes: frequency Minute, interval 15.
  • First of each month: frequency Month, interval 1, with On these days set in the advanced parameters (month days).

Minimum frequency depends on your plan; free and low plans may limit how often a flow can run.

Time zones and daylight saving

Without a time zone the recurrence uses UTC, so a flow set to 7:00 will drift against local time when daylight saving changes. Pick the Time zone in the Advanced parameters so a 7:00 run stays at 7:00 local time.

Calculations inside the flow still use UTC by default: utcNow() returns UTC. Convert when you need local time (see Text, dates and time zones).

Start time and what "starting" means

The Start time anchors the schedule. A flow set to start tomorrow at 9:00 with an interval of 1 day runs at 9:00 every day. If you save a flow with a start time in the past, the schedule counts forward from that anchor, so a 4-hour interval anchored at 8:00 runs at 12:00, 16:00 and so on regardless of when you saved.

Runs can start a little after the scheduled time under heavy load. Do not rely on second-exact timing.

Other ways to wait

  • Delay pauses for an interval (for example 5 minutes).
  • Delay until pauses until a specific timestamp, which is useful for "send the reminder a day before the event".
  • Delay actions count against the flow's total run duration limit, which is 30 days for a run. Use schedules rather than very long delays for long waits.

Simulating a schedule

This stand-in uses Python's standard library to list the next run times for "weekdays at 07:30". It shows the logic a recurrence encodes. It is not the Power Automate scheduler and ignores time zones for simplicity.

Python Stand-in: next five weekday 07:30 runs

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Notice that the first run is the next day because 7:30 on March 6 has already passed.

Interval schedules

An interval schedule counts from the anchor, not from the end of the previous run. This stand-in lists runs for "every 4 hours from 08:00".

Python Stand-in: every 4 hours from an anchor

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Typical scheduled jobs

  • Daily digest: query a list for items due today, build a summary, send an email (see Arrays, objects and JSON).
  • Housekeeping: delete files older than 30 days.
  • Sync: copy new rows from one system to another and remember a high-water mark (the last id or time processed).
  • Health check: call an API and alert when it does not answer.

When a scheduled flow can take longer than its interval, add a safeguard. If two runs overlap they may process the same data twice. Turn on concurrency control with a degree of 1 in the trigger settings, so a new run waits for the previous one.

Common mistakes

  • Forgetting the time zone and being an hour out after daylight saving changes.
  • Scheduling a flow every minute that only needs to run daily, wasting your daily request quota.
  • Not handling days without data: a report flow that fails when the list is empty.
  • Assuming a skipped run is caught up later. Missed runs (for example because the flow was off) are not replayed.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. Which Recurrence field keeps a 7:00 schedule at 7:00 local time through daylight saving changes?

    Setting the time zone makes the schedule follow local time instead of UTC.
  2. 2. What does utcNow() return?

    utcNow() always returns UTC; convert it when you need a local time.
  3. 3. How do you stop two overlapping runs of a scheduled flow?

    A degree of 1 makes a new run wait until the previous one is complete.
  4. 4. What happens to runs missed while a flow was turned off?

    Scheduled runs that did not happen are not caught up later.

Summary

  • The Recurrence trigger takes interval, frequency, time zone, start time and optionally weekdays, hours and minutes.
  • Always set the time zone for human-facing schedules.
  • Use Delay and Delay until sparingly; prefer a schedule for long waits.
  • Guard against overlapping runs and empty data.

Next: Trigger conditions and filtering

Theo dõi tiến độ của bạn

Tạo tài khoản miễn phí để đánh dấu bài đã học và tiếp tục từ chỗ bạn dừng lại trên mọi thiết bị.