English
Appearance
English
Appearance
Task Scheduler is used to automate periodic tasks in WSL, avoiding repetitive manual maintenance. It provides a visual management interface, so you can create and manage scheduled tasks without memorizing complex command-line arguments.
Example use cases for this feature:
All tasks are consolidated under the \WSLDashboard\UserTasks\ path of the Windows Task Scheduler for centralized viewing and management. You can see task status (Ready / Running / Disabled) in the interface in real time.
You can download example scripts (for backing up distributions) from the community repository below to get started quickly:
https://github.com/owu/wsl-community
This is a user-contributed code repository — you're welcome to submit Pull Requests to contribute scripts or share best practices.
Each scheduled task can be configured with a command to execute (a script or executable), supporting the following options:
| Setting | Description |
|---|---|
| Command | The path of the script or executable to run; supports .bat, .ps1, .cmd, .exe, .py and more. You can pick a file with the "Browse" button. |
| Arguments | Extra arguments passed to the command; optional. |
| Administrator privileges | When checked, the task runs with the highest privileges, suitable for operations requiring UAC elevation. |
After creating a task, you can perform the following operations:
| Operation | Description |
|---|---|
| Run now | Force the task to run immediately, regardless of scheduling rules. |
| Enable/Disable | Pause or resume the task's automatic scheduling. |
| Delete | Remove the task from the Task Scheduler. |
Tasks use the standard 5-field Cron expression to define execution rules, in the following format:
minute hour day month weekday| Field | Range | Description |
|---|---|---|
| minute | 0 - 59 | Which minute of every hour to run |
| hour | 0 - 23 | Which hour of every day to run |
| day | 1 - 31 | Which day of every month to run |
| month | 1 - 12 | Which month of every year to run |
| weekday | 0 - 7 | Both 0 and 7 mean Sunday |
Each field supports the following syntax:
* — matches all values (e.g. * * * * * means run every minute)*/N — run every N units (e.g. */5 * * * * means run every 5 minutes)0 9 * * 1 means run at 9:00 AM every Monday)Note: Comma-separated lists (such as
1,15) and range expressions (such as1-5) are not supported; see Notes below for more limitations.
This software does not run a native cron daemon; instead, it translates Cron expressions into Windows Scheduled Task (schtasks.exe) trigger parameters. For accurate mapping, the parser hardcodes support for the following 7 combination patterns, covering most scheduled-task scenarios:
| # | Pattern | Description | Use case |
|---|---|---|---|
| 1 | * * * * * | Run every minute | Monitoring, real-time detection tasks |
| 2 | */N * * * * | Run every N minutes | Periodic check tasks |
| 3 | M * * * * | Run at minute M of every hour (e.g. 3 * * * *) | On-the-hour tasks |
| 4 | M H * * * | Run at H:M every day (e.g. 0 3 * * *) | Daily maintenance, e.g. cleaning up logs in the early morning |
| 5 | M H * * DOW | Run at H:M on a specific weekday (e.g. 0 12 * * 1) | Weekly routine tasks, e.g. backing up data every Monday |
| 6 | M H D * * | Run at H:M on a specific day of the month | Monthly tasks, e.g. generating a report on the 1st of every month |
| 7 | M H D MON * | Run at H:M on a specific month and day of the year | Yearly tasks, e.g. running in a specified month |
If an expression doesn't match any of the 7 patterns above, the system treats it as an
Unsupported cron patternand refuses to create the task.
Because it is implemented on top of Windows Scheduled Tasks, this software's Cron parser differs from standard Linux Cron in the following ways:
,) and ranges (-) are not supported Standard Cron allows defining multiple discrete time points with commas (such as 1,15,30 * * * * for minutes 1, 15, and 30), or ranges with a hyphen (such as 1-5 * * * * for minutes 1 through 5).
Limitation of this software: each field can only contain a single number, an asterisk (*), or a step (*/N); commas and hyphens are not supported.
Standard Cron allows arbitrary combinations of fields (such as * 3 * * * meaning every minute of the 3 AM hour), but this software only supports the 7 fixed patterns listed above; expressions outside this set are rejected.
In standard Cron, */5 * * * * aligns strictly to clock minutes 0, 5, 10, 15.... This software translates it to Windows' /SC MINUTE /MO 5 argument, and Windows calculates the interval from the moment the task is created or enabled.
For example, if you save and enable a task that runs every 5 minutes at 10:02, it will first run at 10:07, then 10:12, rather than aligning to 10:05 on the standard clock.