web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to stop my flow at...
Power Automate
Answered

How to stop my flow at a certain time and then resume it after a delay?

(0) ShareShare
ReportReport
Posted on by

Hello Everyone.

 

How can I make it so that my flow runs up to a certain time each day (e.g. 00:00), then waits for 30 minutes before restarting?

 

Many thanks.

I have the same question (0)
  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    I assume it is on a loop.  Before your loop:

     

    get CurrentDateTime

    Set variable %LastStart% to %CurrentDateTime%
    ’here is your loop

    get %CurrentDateTime%
    Subtract dates

    if %Subtract dates is (greater than interval of time you want it to run)

        Wait 30 mins

        get CurrentDateTime

        Set variable %LastStart% to %CurrentDateTime%

    End(IF)

     

    and continue flow. 

    good luck. 

     

  • Verified answer
    CU-19081228-9 Profile Picture
    on at

    Thank you so much for replying @MichaelAnnis - let me try to get my head around this (comments are in bold).

     

    get CurrentDateTime

    Set variable %LastStart% to %CurrentDateTime%
    ’here is your loop - this is my flow
    get %CurrentDateTime%

    Subtract dates - not sure what you mean here?  Do I subtract %LastStart% from %CurrentDateTime%?

    if %Subtract dates is (greater than interval of time you want it to run) - how can this be >= 00:00 (midnight)?

        Wait 30 mins

        get CurrentDateTime

        Set variable %LastStart% to %CurrentDateTime%

    End(IF)

     

    Thanks for any help provided!

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    If you want to do midnight, you could just say, if day(CurrentDateTime) > day(LastStart). Instead of subtract dates. 

    and yes, your flow goes where you said. 

  • CU-19081228-9 Profile Picture
    on at

    Thank you very much for your kind help @MichaelAnnis 

     

    When I subtract dates, what do I need the result to be in?  Days, minutes, hours etc.?

    Here is what I have - is it correct?

    Start of my flow:

    Flowstart.png



     

     

     

     

    End of flow:

    Flowend.png

  • Verified answer
    MichaelAnnis Profile Picture
    5,727 Moderator on at

    Since you are just doing day over day, you no longer need subtract dates. You did it perfectly in your IF statement. 

    so the first screenshot should be before your loop, and the second screenshot (w/o the subtract dates and w/o the “Go to MainFlowStart”), should be immediately after you open your loop. 


    So it’s:


    get date (this is just when the flow starts so we have something to compare to in the first day)

    start loop

    IF test

    the rest of the loop

     

    so, that if section is built into the loop, and that if section will reset the %LastStart% before it lets the loop proceed (after the 30 min wait). You should never need to go back to the beginning of the flow. 

    good luck. Sorry for the delay in response. It was an extremely busy week. Have a good one. 

        

  • CU-19081228-9 Profile Picture
    on at

    Thanks again @MichaelAnnis - absolutely no need to apologise.  I appreciate your kind help.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 252 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 169

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard