CMD Simulator
Process Managementat

AT Command – Schedule Tasks in Windows Command Prompt

Learn how to use the AT command to schedule programs and batch files to run at specified times in Windows CMD. Guide covers syntax, /every, /next, and migration to SCHTASKS.

Rojan Acharya·
Share

The AT command is a Windows Command Prompt utility that schedules commands, programs, or batch files to run at a specified time on the local or a remote computer. Use AT hours:minutes command to schedule one-time execution, or combine with /every or /next for recurring runs—essential for automation, maintenance scripts, and after-hours processing. Note: Microsoft recommends SCHTASKS for new implementations; AT is deprecated but still available on many systems.

Whether you're a system administrator scheduling backup scripts, a developer automating build processes, or an IT professional running maintenance during off-hours, understanding AT provides context for legacy scripts and migration to SCHTASKS. The command requires the Task Scheduler service to be running and supports local and remote scheduling with flexible time and recurrence options.

This comprehensive guide covers AT syntax, all parameters including /every and /next, practical examples for common scheduling scenarios, migration to SCHTASKS, troubleshooting tips, and frequently asked questions. By the end, you'll understand AT for legacy support and know when to use SCHTASKS instead.

What Is the AT Command?

The AT command is a legacy Windows utility that schedules commands and programs to run at specified times. It was the primary command-line task scheduler before Windows Vista introduced SCHTASKS. AT creates entries in the Task Scheduler and can run commands once or on a recurring schedule (daily, weekly, or monthly).

AT runs in Command Prompt (CMD) and requires the Task Scheduler (Schedule) service to be running. It supports local scheduling and remote scheduling via \\computername. The command is deprecated—Microsoft recommends SCHTASKS for new scripts—but AT remains available on Windows 10, Windows 11, and Windows Server for backward compatibility with existing automation.

AT vs SCHTASKS

  • AT: Legacy; simpler syntax; deprecated; limited options
  • SCHTASKS: Modern; more flexible; recommended; supports triggers, conditions, and actions

Use SCHTASKS for new automation. Use AT only when maintaining legacy scripts or when SCHTASKS is unavailable.

Syntax

AT [\\computername] [[id] [/delete] | /delete [/yes]]
AT [\\computername] hours:minutes [/interactive] [{/every:date[,...] | /next:date[,...]}] command

Parameters

ParameterDescription
\\computernameRemote computer name; omit for local
idJob ID assigned to a scheduled command
/deleteCancels a scheduled job; omit id to cancel all
/yesAnswers yes to all prompts when deleting
hours:minutesTime in 24-hour format (00:00–23:59)
/interactiveAllows the job to interact with the logged-in user's desktop
/every:date[,...]Runs on specified days (M,T,W,Th,F,S,Su or 1–31)
/next:date[,...]Runs on next occurrence of specified day
commandCommand, program, or batch file to run

How to Use AT Command

Schedule a One-Time Command

Run a command at 2:30 PM:

AT 14:30 notepad.exe

The command executes once at the specified time. Use 24-hour format.

Schedule a Batch File

For batch files, precede with cmd /c:

AT 22:00 cmd /c C:\Scripts\backup.bat

Use absolute paths. Paths with spaces require quotes.

Schedule Recurring (Every Weekday)

Run a script every Monday through Friday at 6:00 AM:

AT 06:00 /every:M,T,W,Th,F cmd /c C:\Scripts\daily_check.bat

Use M, T, W, Th, F, S, Su for weekdays. Use 1–31 for specific days of the month.

Schedule Next Occurrence

Run on the next Monday:

AT 09:00 /next:Monday cmd /c C:\Scripts\weekly_report.bat

List Scheduled Jobs

Run AT without arguments to list all scheduled jobs:

AT

Output shows job IDs, times, and commands.

Delete a Scheduled Job

Delete job by ID:

AT 1 /delete

Delete all scheduled jobs:

AT /delete /yes

Schedule on Remote Computer

Schedule on a remote machine (requires admin rights):

AT \\SERVER01 03:00 cmd /c D:\Backup\full_backup.bat

Common Use Cases

  1. Legacy script maintenance – Support existing AT-based automation in enterprise environments until migration to SCHTASKS.

  2. Quick one-time scheduling – Schedule a single command for later execution when SCHTASKS seems excessive.

  3. After-hours maintenance – Run disk cleanup, defragmentation, or backup scripts during off-peak hours.

  4. Batch processing – Schedule data import, report generation, or log rotation for specific times.

  5. Remote administration – Schedule tasks on remote servers from a central management workstation.

  6. Recurring daily tasks – Run scripts every weekday at a fixed time for routine maintenance.

  7. Documentation and training – Understand AT when reviewing or migrating legacy automation.

  8. Emergency scheduling – Quickly schedule a command when GUI Task Scheduler is unavailable.

  9. Script compatibility – Ensure batch files that use AT continue to function in mixed environments.

  10. Troubleshooting scheduled tasks – Diagnose why legacy AT jobs may have stopped running.

Tips and Best Practices

  1. Prefer SCHTASKS – Use SCHTASKS for all new automation; AT is deprecated and may be removed in future Windows versions.

  2. Use cmd /c for batch files – Always use cmd /c before batch file paths: AT 10:00 cmd /c script.bat.

  3. Use absolute paths – Specify full paths for commands and scripts to avoid path resolution issues.

  4. Quote paths with spaces – Use quotes: AT 12:00 "C:\Program Files\MyApp\run.exe".

  5. Verify Schedule service – Ensure the Task Scheduler service is running: sc query schedule.

  6. Run as Administrator – Scheduling often requires elevated privileges, especially for system commands.

  7. Document before migration – List all AT jobs with AT before migrating to SCHTASKS.

  8. Test in non-production – Verify AT commands in a test environment before production use.

  9. Check time zone – AT uses local time; ensure consistency across remote and local systems.

  10. Use /interactive sparingly – Only when the job must interact with the desktop; most automated tasks should run non-interactively.

Troubleshooting Common Issues

"The service has not been started"

Problem: AT returns an error about the service not running.

Cause: The Task Scheduler (Schedule) service is stopped.

Solution: Start the service: net start schedule (requires Administrator). Or use Services (services.msc) to set it to Automatic and start it.

Prevention: Ensure Schedule service is set to Automatic startup on systems that use AT.

"Access is denied"

Problem: AT fails with access denied when scheduling or deleting jobs.

Cause: Insufficient privileges; AT requires Administrator rights for most operations.

Solution: Run Command Prompt as Administrator. Right-click cmd.exe → Run as administrator.

Prevention: Use a dedicated service account with appropriate rights for automated scheduling.

AT Command Not Found

Problem: "AT" is not recognized as a command.

Cause: AT may be disabled or removed in some Windows editions or security configurations.

Solution: Use SCHTASKS instead, which is the recommended replacement. Migrate existing AT jobs to SCHTASKS.

Prevention: Plan migration to SCHTASKS before AT is fully deprecated.

Scheduled Job Does Not Run

Problem: The job is scheduled but does not execute at the expected time.

Cause: Incorrect path, missing cmd /c for batch files, or Schedule service stopped.

Solution: Verify the command with AT to see the exact scheduled string. Ensure batch files use cmd /c. Check that Schedule service is running.

Prevention: Test with a simple command first (e.g., AT 14:35 notepad.exe) to verify scheduling works.

Related Commands

SCHTASKS – Modern Task Scheduler

SCHTASKS creates, modifies, and deletes scheduled tasks with more options than AT. Use for all new automation.

Example:

SCHTASKS /Create /TN "DailyBackup" /TR "C:\Scripts\backup.bat" /SC DAILY /ST 06:00

When to use: New scripts, complex schedules, triggers, conditions.

TASKLIST – List Running Processes

TASKLIST displays currently running processes. Use to verify that a scheduled task started a process.

Example:

TASKLIST

When to use: Verifying scheduled task execution, troubleshooting.

TASKKILL – Terminate Processes

TASKKILL ends processes by name or PID. Use to stop runaway scheduled tasks.

Example:

TASKKILL /IM notepad.exe /F

When to use: Stopping scheduled tasks that did not exit properly.

NET START – Start Services

NET START starts Windows services. Use to start the Schedule service if AT fails.

Example:

NET START schedule

When to use: Enabling Task Scheduler service for AT.

Frequently Asked Questions

What does the AT command do?

AT schedules commands, programs, or batch files to run at a specified time on the local or remote computer. It creates entries in the Windows Task Scheduler and supports one-time or recurring execution.

Is the AT command deprecated?

Yes. Microsoft recommends using SCHTASKS for new task scheduling. AT is deprecated but still available on Windows 10, Windows 11, and Windows Server for backward compatibility.

How do I schedule a batch file with AT?

Use cmd /c before the batch file path: AT 10:00 cmd /c C:\Scripts\myfile.bat. Use absolute paths and quote paths that contain spaces.

What time format does AT use?

AT uses 24-hour format (hours:minutes). For example, 2:30 PM is 14:30, and midnight is 00:00.

How do I list scheduled AT jobs?

Run AT without arguments to list all scheduled jobs on the local computer. For a remote computer: AT \\computername.

How do I delete a scheduled AT job?

Use AT id /delete to delete a specific job by ID, or AT /delete /yes to delete all scheduled jobs. The /yes flag avoids confirmation prompts.

Why does AT say the service has not been started?

The Task Scheduler (Schedule) service must be running. Start it with net start schedule as Administrator, or enable it in Services (services.msc).

What is the difference between AT and SCHTASKS?

AT is legacy with simpler syntax; SCHTASKS is modern with more options (triggers, conditions, multiple actions). Use SCHTASKS for new automation.

Can AT run commands on a remote computer?

Yes. Use AT \\computername hours:minutes command. You need administrative rights on the remote computer.

How do I schedule a task every weekday with AT?

Use /every:M,T,W,Th,F: AT 06:00 /every:M,T,W,Th,F cmd /c C:\Scripts\daily.bat.

What does /interactive do in AT?

/interactive allows the scheduled job to interact with the logged-in user's desktop. Use when the program needs user interaction; omit for background automation.

How do I migrate from AT to SCHTASKS?

Document existing AT jobs with AT, then recreate each using SCHTASKS /Create. SCHTASKS supports equivalent and additional scheduling options.

Quick Reference Card

CommandPurposeExample
ATList scheduled jobsView all jobs
AT 14:30 notepadSchedule one-timeRun at 2:30 PM
AT 06:00 /every:M,T,W,Th,F cmd /c script.batRecurring weekdayDaily at 6 AM
AT 09:00 /next:Monday cmd /c report.batNext occurrenceNext Monday 9 AM
AT 1 /deleteDelete job by IDRemove job 1
AT /delete /yesDelete all jobsClear all
AT \\SERVER 03:00 cmd /c backup.batRemote scheduleOn SERVER at 3 AM

Try AT Command Now

Ready to practice scheduling tasks? Use our Windows Command Simulator to explore command-line automation. For modern task scheduling, see SCHTASKS in our Commands Reference.

Summary

The AT command schedules commands and programs to run at specified times on local or remote computers. It supports one-time and recurring execution via /every and /next, and requires the Task Scheduler service to be running. AT is deprecated—use SCHTASKS for new automation—but remains useful for maintaining legacy scripts and understanding historical Windows scheduling. Master AT for backward compatibility and SCHTASKS for modern task automation.