You don't need a cloud flow or premium license to run a Power Automate Desktop flow on a schedule. This lesson teaches you how to use Windows Task Scheduler with PAD's command-line interface to trigger flows automatically, manage machine availability, and log completion status to a local file.

Picture this: you've built a solid desktop flow that pulls the previous day's sales data from your ERP system, formats it in Excel, and drops a summary CSV into a shared network folder. It runs perfectly when you kick it off manually. The problem? It needs to happen at 6:00 AM every weekday, before the sales team arrives. You don't have a Power Automate Premium license to chain it to a cloud flow trigger, your IT department hasn't provisioned a machine group yet, and asking someone to come in early just to click a button is off the table.
This is precisely the scenario where Windows Task Scheduler — combined with Power Automate Desktop's command-line interface — becomes your best friend. You don't always need a cloud flow to schedule a desktop flow. Windows Task Scheduler, the same tool that runs Windows Update and antivirus scans in the background, can invoke a desktop flow on a precise schedule, on the local machine, with no cloud dependency required. The result runs just as reliably, and you stay entirely within tools you already have.
By the end of this lesson, you'll know how to wire up Windows Task Scheduler to execute a Power Automate Desktop flow on a schedule, verify that the machine is in the right state before it runs, and write a plain-text completion log so you always know what happened — without touching a cloud flow or premium connector.
What you'll learn:
PAD.Console.Host.exe) that you can invoke from outside the appYou should have Power Automate Desktop installed on a Windows 10 or Windows 11 machine. If you haven't done that yet, the Getting Started with Power Automate Desktop: Installing, Recording, and Running Your First Desktop Flow guide walks you through the full setup.
You should know how to build a basic desktop flow — navigate the action panel, run a flow, and understand what variables are. You don't need any cloud licensing for this lesson. Everything here is local.
Before you open Task Scheduler, it's worth understanding why this works at all. Power Automate Desktop isn't just a GUI application — it installs a background service and a console host executable that can run flows programmatically.
When you install Power Automate Desktop, it places a file called PAD.Console.Host.exe in a path like:
C:\Program Files (x86)\Power Automate Desktop\PAD.Console.Host.exe
This executable accepts command-line arguments that tell it which flow to run. The basic syntax looks like this:
"C:\Program Files (x86)\Power Automate Desktop\PAD.Console.Host.exe" -flow "Your Flow Name"
When Windows executes this command, PAD's background service (UIFlowService) wakes up, locates the named flow in the local flow library, and runs it — just as if you had pressed the Play button in the designer. The session needs to be active (more on that in a moment), but no browser-based portal, no cloud connection, and no premium license is required.
Note
The exact path to PAD.Console.Host.exe can vary slightly depending on your version of Power Automate Desktop and whether it was installed per-user or for all users. If the path above doesn't work, search for PAD.Console.Host.exe using Windows Explorer or run where PAD.Console.Host.exe in a command prompt.
This command-line capability is what bridges Power Automate Desktop to Windows Task Scheduler. Task Scheduler's job is to run a program at a specified time — and from its perspective, launching PAD to run a flow is no different from launching any other .exe.
Before configuring the scheduler, you need a flow that makes sense to run on a timer. For this lesson, we'll use a realistic scenario: a morning reconciliation flow that opens a CSV file of overnight transactions, checks for a specific threshold value, and writes a summary line to a log file.
You could build something much more complex — automating Excel to compile reports, pulling data from a web portal, or interacting with a legacy Windows application. The scheduling mechanism is identical regardless of what the flow does.
For the scheduling and logging focus of this lesson, the critical point is that your flow should end by writing a completion record to a log file. Here's how to build that final logging step:
RunTimestamp.RunTimestamp as yyyy-MM-dd HH:mm:ss. Store the result in RunTimestampText.LogLine%RunTimestampText% | COMPLETED | Morning Reconciliation FlowC:\AutomationLogs\flow_run_log.txt%LogLine%Tip
Create the C:\AutomationLogs\ folder manually before the first scheduled run, or add a Create folder action at the start of your flow with "If folder doesn't exist" checked. A missing destination folder is one of the most common reasons logging silently fails.
This log file becomes your ground truth for whether the scheduled run happened and whether it completed normally. If you want to also log failures, wrap your flow logic in an error handling block — the Error Handling in Desktop Flows guide covers exactly how to build that pattern.
Now let's build the Task Scheduler entry. Task Scheduler is a built-in Windows tool — think of it as an alarm clock that, instead of making noise, runs a program. Here's how to set it up step by step.
Open Task Scheduler: Press the Windows key, type "Task Scheduler," and open it. You'll see a two-panel interface: a tree of task folders on the left, and task details on the right.
Create a new task (not a basic task): In the right-hand Actions panel, click Create Task — not "Create Basic Task." The full Create Task dialog gives you the control you need over user accounts and run conditions.
General tab — naming and security context:
PAD Morning Reconciliation (something descriptive)Runs the Power Automate Desktop morning reconciliation flow at 6:00 AM weekdaysTriggers tab — when to run: Click New to create a trigger.
06:00:00 AM1 weeksActions tab — what to run: Click New.
"C:\Program Files (x86)\Power Automate Desktop\PAD.Console.Host.exe"-flow "Morning Reconciliation"Replace Morning Reconciliation with the exact name of your flow as it appears in Power Automate Desktop's flow list. The name is case-sensitive.
Warning
If your flow name contains spaces, the entire flow name must be wrapped in quotes within the arguments field. For example: -flow "Morning Reconciliation Flow". Forgetting the quotes is the single most common reason the task fires but the flow never runs.
Conditions tab:
Settings tab:
2 hours is a safe ceiling for most reconciliation flows.Click OK to save the task.
Here's the most important thing to understand about running desktop flows via Task Scheduler: Power Automate Desktop requires an active, interactive Windows session to run flows that interact with the UI.
This isn't a limitation of PAD specifically — it's a fundamental constraint of Windows UI automation. When a flow needs to click buttons, type into fields, or read screen content, Windows must have a rendered desktop session for those interactions to target. A background session (the kind used when "Run whether logged on or not" is selected without special configuration) doesn't have a rendered desktop.
This means your machine needs to be:
Key insight
A locked screen is not the same as being logged off. When the screen is locked, the user session is still active in memory. Desktop flows can run against a locked session as long as the session belongs to the same user account the Task Scheduler task runs under. If the screen is locked and the flow opens a window, that window opens in the background — the automation still works, it just isn't visible.
For true unattended operation on a server or dedicated machine, you'd typically configure the machine as a registered PAD machine and use a cloud flow trigger. The Attended vs Unattended RPA article explains that architecture in depth. But for a single workstation running on a schedule, the Task Scheduler approach with an active session is completely workable.
Practical machine availability checklist:
The write-to-file logging you built earlier is a good start, but let's make it more robust. A production-quality log entry should include enough information to answer three questions: Did it run? Did it succeed? How long did it take?
Here's a pattern that captures all three. Add these actions at the beginning of your flow:
FlowStartTimeFlowStartTimeText (format: yyyy-MM-dd HH:mm:ss)At the end of your flow, after all the main logic:
FlowEndTimeFlowEndTimeTextFlowEndTimeFlowStartTimeFlowDuration (this gives you a TimeSpan value)LogLine = %FlowStartTimeText% | START: %FlowStartTimeText% | END: %FlowEndTimeText% | STATUS: COMPLETEDC:\AutomationLogs\flow_run_log.txt, append modeIf you're using subflows to organize your logic, put the logging actions in the main flow's final section, after the last subflow call.
For error logging, inside any On Block Error handler, write a different log line:
%FlowStartTimeText% | STATUS: FAILED | ERROR: %LastError%
The %LastError% variable is automatically populated by PAD when an error occurs inside an error block. This gives you an immediate, human-readable error record without needing to open the PAD console.
Tip
Keep your log file path consistent across all flows you schedule this way. A single flow_run_log.txt that all your scheduled flows append to gives you a unified timeline of automation activity on that machine — invaluable when you're debugging a process that involves multiple flows running in sequence.
You can also use PowerShell scripting inside the flow to write richer logs, send log entries to a database, or even email a summary — but the flat file approach requires zero additional infrastructure.
Never wait until 6 AM to discover your task is misconfigured. Test it immediately after creation.
Manual trigger test:
In Task Scheduler, right-click your task in the task list and choose Run. Watch the Power Automate Desktop console — it should appear briefly (or flash) as the flow runs. After it finishes, check C:\AutomationLogs\flow_run_log.txt to confirm a log entry was written.
Check the Last Run Result:
In Task Scheduler, click your task and look at the "Last Run Result" column in the bottom panel. A result of 0x0 means success. Any other value is a Windows error code. The most common ones you'll encounter:
| Code | Meaning |
|---|---|
0x0 |
Success |
0x1 |
Generic error — often a wrong file path in the action |
0x41301 |
Task is currently running |
0x41306 |
Task was terminated (exceeded time limit) |
0x8007010B |
The directory is incorrect — check your program path |
Verify the user context: Right-click the task and choose Properties. Under the General tab, confirm the user account listed is the one that's currently logged in. If the task is configured to run as a different user, it will try to launch PAD in a different session and fail to interact with the UI.
Warning
Avoid configuring your scheduled PAD task to "Run whether logged on or not" unless you've specifically set up PAD as a registered unattended machine with the Power Automate service. In a plain local-scheduling setup, this setting causes the task to run in a non-interactive background session, and the flow will fail silently when it tries to interact with any application window.
Build this end-to-end in under 30 minutes:
Step 1: Create the flow
Open Power Automate Desktop and create a new flow named Scheduled Log Test. Add these actions:
StartTimeStartTimeText (format yyyy-MM-dd HH:mm:ss)EndTimeEndTimeTextLogLine = %StartTimeText% | END: %EndTimeText% | STATUS: COMPLETEDC:\AutomationLogs\scheduled_test_log.txt, appendCreate the C:\AutomationLogs\ folder manually in Windows Explorer.
Step 2: Create the Task Scheduler task Follow the steps in the "Creating the Scheduled Task" section above, but set the trigger to run once, 3 minutes from now, using the One time trigger option instead of weekly.
Use the action: PAD.Console.Host.exe with argument -flow "Scheduled Log Test"
Step 3: Wait and verify
Watch your machine at the trigger time. The display message dialog should appear on screen. After clicking OK (or if you've removed the display message, just after the wait), check C:\AutomationLogs\scheduled_test_log.txt for your log entry.
Step 4: Check Task Scheduler history In Task Scheduler, with your task selected, click the History tab. You should see a sequence of events: task triggered, action started, action completed, task completed.
If the log file has an entry and the History tab shows completion, your scheduled PAD automation is working correctly. Update the trigger to your real weekly schedule and you're done.
"The task fires but nothing happens."
Almost always a path or name issue. Open Task Scheduler, right-click the task, choose Run, then immediately open Event Viewer (Windows key → Event Viewer → Windows Logs → Application) and look for errors from the PAD process. Verify the exact executable path and that the flow name in the -flow argument matches exactly what appears in PAD's flow list.
"The flow runs fine manually but fails on schedule." The scheduled run is using a different working directory or user environment. Add a Set variable action at the top of your flow that sets an absolute path for all file operations — never rely on relative paths in scheduled flows. Also check that any mapped network drives used by the flow are connected under the scheduled user's session.
"The task shows 0x0 success but the log file isn't updated." The flow ran but hit an error before reaching the logging step. Add logging at the beginning of your flow (not just the end) to confirm execution reached inside the flow. Then add error handling to capture what went wrong.
"The machine was asleep when the task was supposed to run." Enable "Wake the computer to run this task" on the Conditions tab, and confirm the machine's BIOS/UEFI supports wake timers (most modern machines do). Alternatively, disable sleep entirely for the automation machine.
"I get an error that PAD.Console.Host.exe isn't found."
Run where PAD.Console.Host.exe in a command prompt while logged in as the scheduled user. The binary may be in a per-user install path like C:\Users\YourName\AppData\Local\Programs\PAD\ rather than the Program Files path. Update the Task Scheduler action with the correct full path.
You've now built a complete local scheduling solution for Power Automate Desktop that runs without any cloud dependency. The core pattern is straightforward: PAD exposes a command-line executable, Windows Task Scheduler calls that executable on a schedule, and your flow writes its own completion record to a log file. Each piece is simple; combined, they give you reliable, auditable, hands-free automation on any Windows machine.
The key constraints to keep in mind: the machine must be on and have an active user session, flow names in the command-line argument must match exactly, and absolute file paths keep scheduled runs reliable across different user contexts.
From here, you have several natural directions to explore:
What you've built today is a genuinely production-viable pattern. Many organizations run critical daily automations exactly this way — no premium license, no cloud dependency, just a reliable machine, a well-built flow, and Windows Task Scheduler doing its quiet, dependable job.
Power Automate Desktop & RPA