schtasks

Windows CMD · System · reference only

What it does

Creates, queries, runs and deletes scheduled tasks from the command line.

Syntax

schtasks /create|/query|/run|/delete|/change [opciones]

Options and parameters

  • /query

    Lists the scheduled tasks.

  • /create

    Creates a new task.

  • /run

    Runs a task now, without waiting for its time.

  • /delete

    Deletes a task; add /f to skip the confirmation.

  • /tn nombre

    Task name.

  • /tr programa

    Program or script the task runs.

  • /sc frecuencia

    Frequency: minute, hourly, daily, weekly, monthly, once, onlogon, onstart.

  • /st hh:mm

    Task start time.

Usage examples

  • schtasks /query

    Lists all the machine's scheduled tasks.

  • schtasks /create /tn Copia /tr C:\scripts\backup.bat /sc daily /st 02:00

    Schedules a daily backup at 2:00.

  • schtasks /run /tn Copia

    Runs the Copia task immediately.

  • schtasks /delete /tn Copia /f

    Deletes the task without asking for confirmation.

Notes and common mistakes

  • To create tasks that run as another user or with privileges you need an administrator console.
  • The time format is 24-hour.

Related commands