user8918316
user8918316

Reputation: 41

Is there a way to schedule and run a Power Automate Desktop flow from desktop itself without using cloud?

I have created a desktop flow using Power Automate Desktop. But I cant schedule or make it run automatically. Is there any way to do so?

I don't wish using cloud flows and connecting Desktop flow using Gateways. I need to automatically run Desktop flows within my desktop machine itself. Any ways to achieve this?

Upvotes: 4

Views: 39390

Answers (5)

Алдар
Алдар

Reputation: 175

I use autoit to start Power Automate and run the workflow. Something like that:

Run("C:\Program Files (x86)\Power Automate Desktop\PAD.Console.Host.exe")
WinWaitActive("Power Automate", "", 10)
WinMove("Power Automate","",0,0)
WinSetState("Power Automate","", @SW_MAXIMIZE)
MouseClick("left",571,253,1)
Exit

Depending on screen resolution change MouseClick parameters to press the button. On the animation below, with mouse I only pressed autoit script, other actions are made by it: enter image description here

Upvotes: 2

Vinod Poduval
Vinod Poduval

Reputation: 41

Directly starting a PA desktop flow using windows scheduler is not possible. However, workaround suggested by Lars Hadidi is doable.

First of all Create a Loop Index and make all your PA desktop flow actions to reside in it and Create an action 'Wait for Process' to wait for a harmless program like cmd.exe or ping.exe in you PAD flow.

Now, follow the below steps

  1. Schedule a Basic Task in Windows scheduler to invoke the exe that you have mentioned in 'Wait for Process' step above. Decide the schedule based on your requirement.
  2. Now start the flow and keep it in start mode.
  3. The flow will stop at the first step 'Wait for Process'
  4. Only when the scheduler will start the process, the flow will move ahead.
  5. The process will execute and the loop index will come back to the 'Wait for Process' step and will go further only when the scheduler is run next.

Make sure that you are not invoking the scheduled exe as part of any other work.

Upvotes: 4

Lars Hadidi
Lars Hadidi

Reputation: 568

For Power Automate Desktop, make sure the computer is running at the scheduled time the Power Automate Desktop Application. Given so, this can serve as a work-around:

  • Start the Windows Task Scheduler and create a 'simple task'
  • Set the schedule.
  • Set 'ping' with argument 'localhost' as execution.
  • In Power Automate use the Wait For Process condition at the beginning of the flow. Set process name to PING

You might want to define Power Automate Desktop as a Windows Service and run it in the background.

Upvotes: 1

Not possible with out-of-the-box Desktop features but you could manually start your flow and let it run. A working example here: Power Automate Gallery

Upvotes: 0

Just Do It
Just Do It

Reputation: 486

Currently this is not supported. You can go and vote for this idea here: Schedule Power Automate Desktop from within Windows 10

Upvotes: 0

Related Questions