📎 AI Summary:
The original poster is seeking a method to set up a one-time startup task using the Windows "schtasks" command-line tool, specifically to run a disk check on reboot without scheduling recurring tasks. A responder provides a link to Microsoft documentation that may contain relevant information. The thread reflects a technical query about task scheduling on Windows, with the overall sentiment being informational and seeking practical solutions.

pstein

Extraordinary Member
Joined
Mar 20, 2010
Messages
454
Thread Author #1
As you know users can setup a task to be run at startup with the built-in task scheduler "schtasks" with

schtasks /sc ONSTART ... /TR ...

However this command syntax triggers the task at EVERY BOOT time.
How do I setup (from command line and not through GUI!!!) a ONE-TIME task?

For simplicity lets assume I want to run chkdsk for partition E: ONCE at next reboot.

How can I achieve this with "schtasks" built-in command?

I don't want to specify a certain time because it varies from time to time and computer to computer and exacty boot time cannot be specified.

Peter