Skip to main content

Scheduling

Power Automate Desktop does not have a schedule execution function. Therefore, it is not possible to implement a function that runs a flow at a specific date and time.

Instead, it can be created if the current time is obtained while the flow is infinite loop, and the process is branched only when it has a specific time.

This time, I will explain the method.

implemented with copy and paste

We have prepared a sample flow that works only at 8:00 in the morning while continuing the loop.

Copy the following code and paste it on the edit screen of Power Automate Desktop to add the target action.

LOOP FROM 0 TO 1 STEP 0
DateTime.GetCurrentDateTime.Local DateTimeFormat: DateTime.DateTimeFormat.DateAndTime CurrentDateTime=> CurrentDateTime
Text.ConvertDateTimeToText.FromCustomDateTime DateTime: CurrentDateTime CustomFormat: $'''HH''' Result=> CurrentHour
Text.ConvertDateTimeToText.FromCustomDateTime DateTime: CurrentDateTime CustomFormat: $'''mm''' Result=> CurrentMinute
IF (CurrentHour = '08' AND CurrentMinute = '00') = True THEN
Display.ShowMessageDialog.ShowMessage Title: $'''It is the specified time.''' Message: $'''It's 8 o'clock in the morning!''' Icon: Display.Icon.Information Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: False
END
WAIT 60
END

Multiple conditions are stored in the IF sentence.See the following page for details of this method.

Points to be careful

Watch out for duplicate execution

In this sample, he runs a loop every minute and works only at 8:00.

However, if this condition is only at 8 o'clock, the action in the IF sentence will be executed about 60 times.

It is necessary to define the variable whether or not to be executed, and set a value on the variable once it is executed.