cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tawfik_Chelli
New Member

How to run a desktop flow from windows task scheduler

 

My Objective is to run the flow once when pc starts between 8 am till 10 am each day using the windows task scheduler.

flow.PNG

 

20 REPLIES 20
miketran13
Solution Specialist
Solution Specialist

Hello,

 

Unfortunately, there is no way for you to do that and I don't think Microsoft will support this in the future. Because you have to use Power Automate on Cloud as the orchestrator for triggering manually or schedule it from there. You can't do that from a task scheduler. 

 

Thanks and hope it can help you. 

Mike

---------------------------------

Did I answer your question? Please consider to Mark my post as a solution! to guide others

maciejewski
New Member

HI

Without offline scheduler/executor PAD is not usable for now.

 

miketran13
Solution Specialist
Solution Specialist

Hi,

 

Why don't you use Schedule Flows to run your Desktop flows ?

 

scheduleflows.png

 

Thanks and hope it can help you. 

Mike

---------------------------------

Did I answer your question? Please consider to Mark my post as a solution! to guide others

thanks for suggestion but we need it to can run offline - like in WinAutomation 

DamoBird365
Super User
Super User

HI @maciejewski ,

 

I've been looking into this too.  Unfortunately this is not possible at the moment and it is unclear if it ever will be.  When you run the PAD from your PC, it calls an instance to run from the Cloud.

 

The following command is called:

"C:\Program Files (x86)\Power Automate Desktop\PAD.Runtime.Robot.exe" --path "C:\Users\[**UserName**]\AppData\Local\Microsoft\Power Automate Desktop\Console\Workspace\829e4538-9631-4e12-a2c4-187299a15ae7\package" --instanceId 4ec585ad1a69462a9818e4648f32ca13 --varPreviewChars 128 --varPreviewLines 5

 

This includes the GUID for your PAD and an instanceId.  Whilst the GUID for your PAD matches with that of the cloud, I couldn't establish how the InstanceId was obtained which must be some sort of authentication to run the flow.

 

It's quite interesting because you can see all of your solutions here:

C:\Users\[**UserName**]\AppData\Local\Microsoft\Power Automate Desktop\Console\Workspace\

 

For now at least - it is not possible.

 

Damien

DamoBird365
Super User
Super User

Hi @Tawfik_Chelli , @maciejewski , @miketran13 

 

I've posted the idea here.

thanks for information Damien 

 

error in link:

The page you are trying to access was not found. Please check your URL for typos and try again.

 

for now we stick with WinAutomation

@maciejewski - sorted cheers.

This doesn't work for personal accounts.

pcand1001
Helper I
Helper I

Try API commands

fraenK
Memorable Member
Memorable Member

@DamoBird365 The "instanceId" should be the "flowsessionId" which represents the run (instance) of a flow, which you can see in the run history of a desktop flow: https://docs.microsoft.com/en-US/powerapps/developer/data-platform/reference/entities/flowsession#BK...

pcand1001
Helper I
Helper I

OK, Here is how I did it. Way too complex, requires premium but it does work. Now I can add PAD Flows to my enterprise scheduler workflows or Powershell or any other automation tool. i.e. run on schedule, run in a loop and so on.
1) Install a gateway to your machine
2) Create a flow to receive the API call and run the desktop flow
3) Copy paste the URL where you need it, in my example, I use Postman.
Copy screen, Flow, Postman.

Spoiler
PAD API Call.pngPAD Flow.png


 

Anonymous
Not applicable

I don't see a way to Schedule Flows to run Desktop flows.  Do I have to recreate a flow using Cloud Flow?  I followed https://docs.microsoft.com/en-us/power-automate/desktop-flows/run-pad-flow and have the gateway and connections configured (I think).  

 

Thank you!!!!

t5p_0-1618348989426.png

t5p_1-1618349031695.png

 

fraenK
Memorable Member
Memorable Member

When I tried to run a PAD from power automate.  It stated I needed a Premium account

fraenK
Memorable Member
Memorable Member

You'll need at least:

"Per-user plan with attended RPA"

https://flow.microsoft.com/en-us/pricing/

 

Maybe also "Unattended RPA add-on" if you want to run the flow without a user present.

What if you do not have a 'premium' license?  How do desktop flows get scheduled?

You can make a schedule flow who will control other flow. Make endless loop where are inside run other desktop flows. But after restart pc need manually run your schedule flow. 🙂

Untitled.png

Hey @maciejewski 

Power Automate for Desktop, requires internet connection to work. To schedule flows you will need a license.

Currently, there are no plans on offering an offline solution.


Cheers,

Kostas

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (4,154)