Schedule ONE-TIME task with "schtasks" at next reboot?

Discussion in 'Windows 7 Help and Support' started by pstein, Mar 10, 2015.

  1. pstein

    pstein Honorable Member

    Joined:
    Mar 20, 2010
    Messages:
    347
    Likes Received:
    0
    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
     
  2. patcooke

    patcooke Microsoft MVP
    Staff Member Premium Supporter Microsoft MVP

    Joined:
    May 16, 2010
    Messages:
    5,455
    Likes Received:
    268

Share This Page

Loading...