English
Appearance
English
Appearance
Task Scheduler is used to automate recurring tasks in WSL, saving you from repetitive manual maintenance. It provides a visual management interface so you can create and manage scheduled tasks without memorizing complex command-line parameters.
Example use cases:
All tasks are organized under \WSLDashboard\UserTasks\ in Windows Task Scheduler for centralized management. You can view real-time task status (Ready / Running / Disabled) in the interface.
You can download example scripts (backup distributions) from the community repository to get started quickly:
https://github.com/owu/wsl-community
This is a community-driven code repository. Pull Requests are welcome to contribute scripts or share best practices.
Each scheduled task can be configured with a command (script or executable), supporting the following options:
| Setting | Description |
|---|---|
| Command | Path to the script or executable. Supports .bat, .ps1, .cmd, .exe, .py formats. Use the "Browse" button to select a file. |
| Arguments | Additional arguments to pass to the command, optional. |
| Run with admin privileges | When enabled, the task runs with the highest privileges, suitable for operations requiring UAC elevation. |
After creating a task, you can perform the following operations:
| Action | Description |
|---|---|
| Run now | Force the task to execute immediately, regardless of schedule. |
| Enable/Disable | Pause or resume the task's automatic schedule. |
| Delete | Remove the task from the Task Scheduler. |
Task scheduling uses the standard 5-field Cron expression to define execution rules, formatted as follows:
minute hour day month weekday| Field | Range | Description |
|---|---|---|
| minute | 0 - 59 | The minute of the hour to execute |
| hour | 0 - 23 | The hour of the day to execute |
| day | 1 - 31 | The day of the month to execute |
| month | 1 - 12 | The month of the year to execute |
| weekday | 0 - 7 | Day of the week (0 and 7 both represent Sunday) |
Each field supports the following syntax:
* — Matches all values (e.g., * * * * * means every minute)*/N — Every N units (e.g., */5 * * * * means every 5 minutes)0 9 * * 1 means every Monday at 9:00 AM)Note: Comma-separated values (e.g.,
1,15) and range expressions (e.g.,1-5) are not supported. For more limitations, see Important Notes below.
This software does not run a native Cron daemon. Instead, it translates Cron expressions into Windows Task Scheduler (schtasks.exe) trigger parameters. To ensure accurate mapping, the parser only supports the following 7 combination patterns, covering most scheduled task scenarios:
| # | Pattern | Description | Use Case |
|---|---|---|---|
| 1 | * * * * * | Execute every minute | Monitoring, real-time detection tasks |
| 2 | */N * * * * | Execute every N minutes | Periodic check tasks |
| 3 | M * * * * | Execute at minute M of every hour (e.g., 3 * * * *) | Hourly tasks |
| 4 | M H * * * | Execute at H:M every day (e.g., 0 3 * * *) | Daily maintenance, e.g., cleaning logs at midnight |
| 5 | M H * * DOW | Execute at H:M on a specific day of the week (e.g., 0 12 * * 1) | Weekly routine tasks, e.g., backing up data every Monday |
| 6 | M H D * * | Execute at H:M on a specific day of the month | Monthly tasks, e.g., generating reports on the 1st |
| 7 | M H D MON * | Execute at H:M on a specific month and day | Annual tasks, e.g., executing in a specific month |
If the expression does not match any of the above 7 patterns, the system will reject it as
Unsupported cron pattern.
Since the implementation is based on Windows Task Scheduler, the Cron parser in this software differs from standard Linux Cron in the following ways:
,) and Ranges (-) Not Supported Standard Cron allows defining multiple discrete time points with commas (e.g., 1,15,30 * * * * means at minutes 1, 15, and 30), or ranges with hyphens (e.g., 1-5 * * * * means minutes 1 through 5).
This software's limitation: Each field can only contain a single number, asterisk (*), or step value (*/N). Commas and hyphens are not supported.
Standard Cron allows arbitrary combinations of fields (e.g., * 3 * * * means every minute during the 3:00 hour). However, this software only supports the 7 fixed patterns listed above. Expressions outside this range will be rejected.
In standard Cron, */5 * * * * strictly aligns to clock minutes 0, 5, 10, 15.... This software translates it to Windows' /SC MINUTE /MO 5 parameter. 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 execute at 10:07, then 10:12, rather than aligning to the standard clock's 10:05.