Windmill vs Windows Task Scheduler and SQL Server Agent
Windows and SQL Server each ship with a scheduler. This page puts the two of them next to Windmill: where each one runs, what a job can run, what starts it, who sees the runs, and when keeping the Microsoft schedulers is the right call.
- 01How a job runsWhere each one runs, what a job runs, what starts it
- 02Day to dayCredentials, failures, visibility, permissions, files
- 03Microsoft toolsWhere Task Scheduler or SQL Server Agent is the better choice
- 04WindmillWhere Windmill is the better choice
- 05Using them togetherKeeping the Microsoft schedulers and adding Windmill
- 06Where to startWho each tool is for, and the first pages to read
Who each tool is for
This page is a short overview, written by Windmill. The Windows automation page compares Windmill with Task Scheduler, Power Automate and enterprise job schedulers in one table. Feel free to contact us for corrections.
An open-source, self-hostable platform that schedules and runs scripts and workflows from one place, on the workers you deploy and, on Self-Hosted Enterprise Edition, on native Windows workers. It is for teams whose scheduled scripts span several servers, databases and languages, and who want one place to schedule them, see every run, handle failures and review changes.
The Windows service that runs a program on a chosen computer at a set time or when an event occurs, installed with every supported version of Windows. It is for running a program or a batch file on one Windows computer, at a time or on an event such as system startup, user logon or idle time, and is managed from its graphical interface, the schtasks command or the ScheduledTasks PowerShell module.
The Windows service that runs scheduled administrative tasks, called jobs, in SQL Server and Azure SQL Managed Instance. It is for database administrators automating work on a SQL Server instance: backups, maintenance, SSIS packages, replication agents and T-SQL or PowerShell job steps, with job information stored in SQL Server itself. It is not available in Azure SQL Database, where Microsoft offers elastic jobs instead, and the SQL Server 2025 editions table lists it for Enterprise and Standard but not Express.
Where each one runs, and what a job can be
Task Scheduler runs on each Windows computer, as part of Windows, and a task is up to 32 actions run in sequence. SQL Server Agent runs as a Windows service next to a SQL Server instance, and its job steps are T-SQL, PowerShell, operating system commands, SSIS packages, Analysis Services commands and queries, and replication agents. Windmill is a central server and PostgreSQL database with jobs running on the workers you deploy, and a job is a script in one of several supported languages or a flow of scripts.
Where it runs
A central server and PostgreSQL database, self-hosted on Docker Compose or Kubernetes, or on Windmill Cloud. Jobs run on workers; Windows workers can run as a Windows service and are Self-Hosted Enterprise.
On each Windows computer, as part of Windows.
As a Windows service next to a SQL Server instance, or in Azure SQL Managed Instance.
What a job runs
Up to 32 actions per task, run in sequence: start a program or fire a COM handler (the email and message actions were removed in Windows 8 and Windows Server 2012).
Job steps: T-SQL, PowerShell, operating system commands (CmdExec), SSIS packages, Analysis Services commands and queries, and replication agents.
What starts it
Cron schedules, webhooks, HTTP routes, email and other triggers (Kafka is self-hosted Enterprise Edition, Postgres triggers are not available on Cloud), the API, the CLI, or a run from the auto-generated form.
Time-based triggers (once, daily, weekly, monthly) and event-based triggers (system startup, user logon, idle). Up to 48 triggers per task.
Schedules (when the Agent starts, when the CPU is idle, one time, recurring), alerts on SQL Server events, performance conditions or WMI events, and the sp_start_job stored procedure.
Scope
One instance for all workers. Worker tags route each script or flow to the workers that should run it, for example Windows workers for PowerShell.
One computer per task. schtasks and the ScheduledTasks cmdlets can also manage tasks on a remote computer.
Databases on the Agent's own instance. Multiserver administration lets a master server distribute jobs to target servers; it is not available in SQL Managed Instance.
Credentials, failures, visibility, permissions and files
Task Scheduler tasks are seen on each computer, and SQL Server Agent stores job information in SQL Server itself. Windmill keeps credentials in resources and variables, lists all past and future runs on a Runs page per workspace, and can commit scripts, flows, schedules and triggers to a repository.
Run identity and credentials
Connection details live in resources and secrets in variables, encrypted with a workspace-specific key. For SQL Server, Windows integrated authentication uses the account the worker runs as (Windows SSPI on Windows workers, Kerberos on Linux workers). MS SQL scripts need Enterprise Edition or Cloud, and integrated authentication needs a self-hosted worker.
A user account or group, or a built-in account such as SYSTEM, LOCAL SERVICE or NETWORK SERVICE.
T-SQL steps use EXECUTE AS. Other steps run under a proxy that maps to a credential.
When a job fails
Retries on flow steps, a flow error handler, and schedule error and recovery handlers, with pre-set handlers for Slack and Microsoft Teams. The schedule error handler is available on Cloud and Enterprise Edition.
The task can be restarted a set number of times (RestartCount). By default a task is stopped 72 hours after it starts.
Alerts notify operators by email through Database Mail, by pager or by net send; Microsoft plans to remove the pager and net send options.
Where you see jobs
A Runs page per workspace with all past and future runs, and audit logs for every operation with side effects (full, unredacted entries need the Enterprise Edition).
On each computer, in the Task Scheduler interface or with schtasks /query.
In SQL Server Management Studio, or by querying job tables such as msdb.dbo.sysjobs.
Permissions
Roles and permissions on scripts, flows, apps, resources, variables, schedules and jobs, with groups and folders.
Access control lists on task files. Administrators and SYSTEM can manage any task; other users manage the tasks they created.
Fixed msdb roles (SQLAgentUserRole, SQLAgentReaderRole, SQLAgentOperatorRole) and the sysadmin server role.
Definitions as files
Git sync commits scripts, flows, schedules and triggers to a repository: Cloud and Enterprise Self-Hosted, and Community Edition for workspaces with up to 2 users.
A task can be registered from an XML definition (Register-ScheduledTask -Xml).
Jobs are defined in SQL Server Management Studio, in T-SQL or with SQL Server Management Objects.
Where Task Scheduler or SQL Server Agent is the better choice
Task Scheduler is already on every Windows machine, and SQL Server Agent is included with SQL Server and Azure SQL Managed Instance. Each is close to something a central scheduler is not: the state of one Windows machine, and the database engine.
- One job on one machine. If a single script has to run on a single computer and nothing else depends on it, Task Scheduler is already installed and needs no server or database.
- Work tied to that machine's state. Triggers on system startup, user logon or idle time, and power-aware scheduling that defers maintenance until the device is idle and on AC power, are part of Windows itself.
- Maintenance inside one instance. Backups, jobs created by the Maintenance Plan Wizard, replication agents and SSIS packages are run by the instance's own Agent service, and SQL Server Agent stores job information in SQL Server itself.
- Reacting to the database engine. Agent alerts fire on SQL Server events and performance conditions and can start a job in response.
- Many Azure SQL databases. For Azure SQL Database, Microsoft's elastic jobs run T-SQL across servers, elastic pools and subscriptions, and enumerate the target databases at run time.
Where Windmill is the better choice
Windmill is for teams whose scheduled scripts span several servers, databases and languages, and who want one place to schedule them, see every run, handle failures and review changes.
Scripts spread across many servers
Schedules for every host are defined in one workspace, each run is listed on the Runs page, and worker tags decide which machine runs what. Windows workers connect to the same server and database as the rest of the fleet.
Jobs that cross systems
A flow can query SQL Server, call an API, run PowerShell on a Windows host (Windows workers are Self-Hosted Enterprise) and wait for an approval, with each step in the language that suits it.
Failure handling you do not write yourself
Retries are a setting on each flow step, and schedules have pre-set error and recovery handlers for Microsoft Teams and Slack (the schedule error handler is available on Cloud and Enterprise Edition).
Changes reviewed like code
Git sync puts scripts and schedules in a repository, and audit logs record each operation with side effects and the user behind it (full, unredacted entries need the Enterprise Edition).
Azure SQL Database
SQL Server Agent is not available there. Windmill's MS SQL resource connects to Azure SQL with Microsoft Entra, or on AKS with Azure workload identity and no stored password (MS SQL scripts need Enterprise Edition or Cloud, and workload identity needs a self-hosted worker on AKS).
Using them together
You do not have to move everything at once.
Keep SQL Server Agent for engine maintenance and start its jobs from Windmill
An Agent job can be started with the sp_start_job stored procedure, so an MS SQL step in a Windmill flow can kick off an existing backup or maintenance job and the flow can carry on with the work around it. MS SQL scripts need Enterprise Edition or Cloud.
Move Task Scheduler jobs one at a time
A PowerShell script's param() block becomes its typed inputs, and Import-Module installs missing modules at run time (details). Schedule the script in Windmill, tag it for a Windows worker (Self-Hosted Enterprise) or a Linux worker, and let the Task Scheduler task run in parallel until you are confident, as described in Native Windows automation without Docker, WSL, or workarounds.
Let a local task call Windmill
A Task Scheduler task runs a command line, and every Windmill script and flow has webhooks, so a task that must stay on a machine can hand the rest of the work to a Windmill flow.
Where to start
If a single script has to run on a single computer and nothing else depends on it, Task Scheduler is already installed and needs no server or database. If the work is maintenance inside one SQL Server instance, or it reacts to SQL Server events and performance conditions, that is what SQL Server Agent is for. Windmill is the one to try when the scheduled scripts span several servers, databases and languages, and you want one place to schedule them, see every run, handle failures and review changes.
Read the detailed comparison in the docs: Windmill vs Windows Task Scheduler and SQL Server Agent.
Frequently asked questions
Build your internal platform on Windmill
Scripts, flows, apps, and infrastructure in one place.