Cron tools › Convert
Cron to Task Scheduler
Paste a cron schedule and get the schtasks /create commands that reproduce it on Windows — and a
PowerShell version when the triggers are daily or weekly. Each task's trigger is expanded back into start times and compared
with the cron line. When Task Scheduler cannot say the schedule, the page tells you why and what the closest honest setup is.
Try one
How to schedule a cron job in Windows Task Scheduler
- Paste the cron schedule. Quartz, AWS and Spring expressions work too, so
Land#can map to LASTDAY and FIRST–FOURTH. - Fill in a task name and the program to run; put its arguments in the separate box so the quoting comes out right.
- Run the
schtaskslines in a Command Prompt (or use the PowerShell block when it is shown). - Check the green line: the triggers, expanded back into start times, match the cron runs.
What maps exactly
| Cron shape | Example | schtasks |
|---|---|---|
| every N minutes, all day (N divides 60) | */15 * * * * | /sc minute /mo 15 /st 00:00 |
| every N hours (N divides 24) | 0 */6 * * * | /sc hourly /mo 6 /st 00:00 |
| once a day | 30 2 * * * | /sc daily /st 02:30 |
| weekdays | 0 9 * * 1-5 | /sc weekly /d MON,TUE,WED,THU,FRI /st 09:00 |
| one date a month | 0 0 15 * * | /sc monthly /d 15 /st 00:00 |
| last day of the month | 0 0 12 L * ? (Quartz) | /sc monthly /mo LASTDAY /m * /st 12:00 |
| first to fourth weekday | 0 0 9 ? * 2#1 (Quartz) | /sc monthly /mo FIRST /d MON /st 09:00 |
| several times a day | 0 9,17 * * * | one task per start time, named backup-0900, backup-1700 |
What schtasks cannot say
- An interval inside a window, like
*/15 9-17 * * 1-5. A task has one start time; covering that window would take 36 tasks. The closest honest setup is an all-day repeat with a script that exits early outside the window. - Several dates a month in one task: a monthly task takes a single date (
/d 1-31), so0 0 1,15 * *becomes two tasks. - Weekdays in some months only: a weekly task has no month filter.
- Day of month AND day of week (cron's
*/2day with a weekday): a trigger is weekly or monthly, never both. - The fifth weekday or seconds:
/mostops at FOURTH, and/stis HH:mm.
FAQ
Why does one cron line become several tasks?
Because a schtasks task has one start time, and a monthly task one date. 0 9,17 * * * needs a 09:00 task and a 17:00
task. The PowerShell version, when shown, registers one task with several triggers instead.
How is a program path with spaces quoted?
The whole /tr value is wrapped in double quotes, and a path with spaces gets escaped inner quotes:
/tr "\"C:\Program Files\App\app.exe\" --full". Keep arguments in the Arguments box and the page does this for you.
What about day 29, 30 or 31?
Cron simply skips months that do not have that date. What Task Scheduler does with a missing date is not covered by our reference, so the page warns you to test it; the check assumes the month is skipped, like cron.
Why is there no PowerShell version for monthly schedules?
New-ScheduledTaskTrigger offers daily and weekly triggers but no monthly one, so monthly schedules are given as
schtasks commands only.