schtasks

Schedule and Manage Automated Tasks

What Does It Do?

The SCHTASKS command enables administrators to create, delete, query, change, run, and end scheduled tasks on a local or remote system. It provides complete control over Windows Task Scheduler from the command line.

Think of SCHTASKS as your automation command center. It allows you to schedule programs, scripts, or commands to run automatically at specific times, intervals, or when certain events occur. Essential for system maintenance, backups, monitoring, and any repetitive tasks that need to run without manual intervention.

Advertisement

[ Insert Google AdSense Banner Code Here ]

When Should I Use It?

Automated Backups

Schedule backup scripts to run daily, weekly, or at custom intervals.

System Maintenance

Automate disk cleanup, updates, or other maintenance tasks during off-hours.

Monitoring & Alerts

Run monitoring scripts that check system health and send alerts.

Recurring Reports

Generate and email reports on a regular schedule automatically.

Common Commands

schtasks /query

Display all scheduled tasks on the system.

schtasks /create /tn "Backup" /tr "C:\backup.bat" /sc daily /st 02:00

Create a daily task named "Backup" that runs at 2:00 AM.

schtasks /create /tn "WeeklyReport" /tr "report.exe" /sc weekly /d MON /st 09:00

Create a weekly task that runs every Monday at 9:00 AM.

schtasks /run /tn "Backup"

Manually run a scheduled task immediately (for testing).

schtasks /delete /tn "Backup" /f

Delete a scheduled task without confirmation prompt.

schtasks /query /tn "Backup" /v /fo list

Display detailed information about a specific task in list format.

Pro Tip: Schedule Types

SCHTASKS supports multiple schedule types with /SC parameter:

/SC MINUTE /MO 30 - Every 30 minutes /SC HOURLY /MO 2 - Every 2 hours /SC DAILY - Every day /SC WEEKLY /D MON,WED,FRI - Specific days /SC MONTHLY /D 1 - First day of month /SC ONSTART - At system startup /SC ONLOGON - At user logon /SC ONIDLE /I 10 - When idle for 10 mins

Combine these with /ST (start time) and /ET (end time) for precise scheduling. Use /RU to specify which user account runs the task.

Try It Yourself

Practice SCHTASKS commands in the interactive terminal below: