Using the Windows Job Scheduler SCHTASKS.EXE
command was introduced in Windows XP and Windows 2003 as a
more flexible and slightly more verbose replacement for the
The AT command is still available for backwards
compatibility, but it is no longer the preferred command
line scheduling method.
command provides a command line API for situations in which
a command line approach is preferable.
The usage notes for the
command are very comprehensive and include examples as well
as basic syntax. The
top-level usage notes are displayed below with examples
indicating how more parameter specific usage notes can be
SCHTASKS /parameter [arguments]
Enables an administrator to create,
delete, query, change, run
end scheduled tasks on a local or
remote system. Replaces AT.exe.
Creates a new scheduled task.
Deletes the scheduled task(s).
Displays all scheduled tasks.
Changes the properties of scheduled task.
Runs the scheduled task immediately.
Stops the currently running scheduled task.
Displays this help/usage.
SCHTASKS /Run /?
SCHTASKS /End /?
SCHTASKS /Create /?
SCHTASKS /Delete /?
SCHTASKS /Change /?
To schedule a job that runs the
c:\jobs\MyJob.bat script at 9:00 p.m. on
Mondays, Tuesdays, Thursdays and Fridays, the following
commands would be used:
SCHTASKS /Create /TN MyJob /TR
C:\Jobs\MyJob.bat /ST /SC weekly /D MON,TUE,THU,FRI
The task will be created under
current logged-on user name ("tim_hall").
Please enter the run as password for
SUCCESS: The scheduled task "MyJob" has
successfully been created.
Once a task is created, it can be viewed by issuing the
command with no parameters:
Next Run Time
Tasks that are no longer needed can be deleted using the
C:\>SCHTASKS /delete /TN MyJob
WARNING: Are you sure you want to remove
the task "MyJob" (Y/N )? y
SUCCESS: The scheduled task "MyJob" was
INFO: There are no scheduled tasks
present in the system.
Since some of the external schedulers available on the most
common operating systems have been presented, the following
section will focus on the internal schedulers provided by
the Oracle database.
Get the Complete
Oracle SQL Tuning Information
The landmark book
SQL Tuning The Definitive Reference" is
filled with valuable information on Oracle SQL Tuning.
This book includes scripts and tools to hypercharge Oracle 11g
performance and you can
for 30% off directly from the publisher.