Oracle Consulting Oracle Training Development

Remote DBA

Remote DBA Plans  

Remote DBA Service

Remote DBA RAC

   
Remote DBA Oracle Home
Remote DBA Oracle Training
Remote DBA SQL Tuning Consulting
Remote DBA Oracle Tuning Consulting
Remote DBA Data Warehouse Consulting
Remote DBA Oracle Project Management
Remote DBA Oracle Security Assessment
Remote DBA Unix Consulting
Burleson Books
Burleson Articles
Burleson Web Courses
Burleson Qualifications
Oracle Links
Remote DBA Oracle Monitoring
Remote DBA Support Benefits
Remote DBA Plans & Prices
Our Automation Strategy
What We Monitor
Oracle Apps Support
Print Our Brochure
Contact Us (e-mail)
Oracle Job Opportunities
Oracle Consulting Prices





   

 

 

 

Remote DBA services

Remote DBA Support

Remote DBA RAC

Remote DBA Reasons

Remote Oracle Tuning

Remote DBA Links

Oracle DBA Support

Oracle DBA Forum

Oracle Disaster

Oracle Training

Oracle Tuning

Oracle Training

 Remote DBA SQL Server

Remote MSSQL Consulting

Oracle DBA Hosting

Oracle License Negotiation

 

 


 

 

 

        
 

Oracle Job Scheduling Using Windows
AT Command

Oracle Tips by Burleson Consulting

Advanced Oracle Utilities: The Definitive Reference by Rampant TechPress is written by the top Oracle database experts (Bert Scalzo, Donald Burleson, and Steve Callan).  The following is an excerpt from the book.

Using the Windows Job Scheduler at.exe utility

The AT command can be used to schedule commands and programs on Windows NT, Windows 2000, Windows XP and Windows 2003.  For the command to work, the scheduler service must be running.  On Windows 2000, this can be done using the services dialog (Start Programs Administrative Tools Services) or from the command line using the net command:

 

net stop "Task Scheduler"

net start "Task Scheduler"

 

The at /? command produces the following:

 

AT [\\computername] [ [id] [/DELETE] | /DELETE [/YES]]

AT [\\computername] time [/INTERACTIVE]

    [ /EVERY:date[,...] | /NEXT:date[,...]] "command"

 

A couple of simple examples of its use include:

 

C:> at 21:00 /every:m,t,th,f "c:\jobs\MyJob.bat"

Added a new job with job ID = 1

 

C:> at 6:00 /next:20 "c:\jobs\MyJob.bat"

Added a new job with job ID = 2

 

The first example schedules a job which runs the c:\jobs\MyJob.bat script at 9:00 p.m. on Mondays, Tuesdays, Thursdays and Fridays.  The second example schedules a job that runs the script at 6:00 a.m. on the next 20th of the month.  The current list of jobs can be displayed by issuing the AT command with no parameters:

 

C:\>at

 

Status ID   Day                     Time          Command Line

--------------------------------------------------------------------

        1   Each M T Th F           21:00 PM      c:\jobs\MyJob.bat

        2   Next 20                 06:00 AM      c:\jobs\MyJob.bat

 

C:\>

 

Jobs can be deleted using the /delete option:

 

C:\>at 1 /delete

 

C:\>at 2 /delete

 

C:\>at

There are no entries in the list.

 

The AT scheduler has been in Windows scheduling for many years, but recent Windows versions have introduced simpler and more flexible alternatives which will be covered in the following section.

Using the Windows Scheduled Tasks Wizard

In Windows, there is a GUI tool called the Scheduled Tasks Wizard, which is far more convenient than the AT command.  It is available from the Control Panel or from the task bar (Start Programs Accessories System Tools Scheduled Tasks).  The resulting dialog lists the current scheduled tasks and an Add Scheduled Task icon, as seen in Figure 11.3.

 

Figure 11.3 Scheduled Tasks Dialog with no Scheduled Jobs

 

To schedule a new task, simply double click on the Add Scheduled Task icon, which starts the Scheduled Tasks Wizard as shown in Figure 11.4.

 

Figure 11.4 Scheduled Tasks Wizard

 

Clicking the Next button produces a list of programs that can be scheduled as shown in Figure 11.5.  If the program or script that is desired is not available in the list, the Browse button allows the user to select alternatives from the file system.

 

Figure 11.5 Scheduled Tasks Wizard:  Program List

 

Once the relevant command or script is selected, clicking the Next button displays a screen that allows a name and basic schedule to be associated with the task as shown in Figure 11.6.

 

Figure 11.6 Scheduled Tasks Wizard:  Name and Basic Schedule

 

The contents of the next screen vary depending on the type of basic schedule selected.  Figure 11.7 shows the additional schedule information that can be defined for a daily task.

 

Figure 11.7 Scheduled Tasks Wizard: Additional Scheduling Options

 

The next screen permits authorization credentials for the task to be assigned, allowing the task to run as any valid operating system user.  It is important that tasks run with the correct credentials as running tasks under privileged accounts can introduce potential security holes. 

 

Figure 11.8 Scheduled Tasks Wizard:  Authorization Details

 

Finally, a summary page is displayed which gives the option of displaying the advanced properties dialog once the job definition is complete.  If this option is left unchecked, clicking the Finish button displays the original scheduled tasks list.

 

Figure 11.9 Scheduled Tasks Wizard:  Summary

 

The newly scheduled task is now displayed in the scheduled tasks dialog:

 

Figure 11.10 Scheduled Tasks Dialog with Newly Scheduled Job Listed

 

Right clicking on the job and selecting the Properties option from the pop-up menu, as in Figure 11.11, displays the advanced properties dialog.  This dialog allows the task definition to be modified after it is created.

 

Figure 11.11 Scheduled Job Properties Dialog


The following section will present the SCHTASKS
command which provides a more feature-rich command line alternative to the AT command.
 


Fo
r more details on Oracle utilities, see the book "Advanced Oracle Utilities" by Bert Scalzo, Donald K. Burleson, and Steve Callan.

You can buy it direct from the publisher for 30% off directly from Rampant TechPress.


 

     

Remote DBA Service
 

Oracle Tuning Book

 

Advance SQL Tuning Book 

BC Oracle support

Oracle books by Rampant

Oracle monitoring software

 

 

 

 

 

 

 

 

 

BC Remote Oracle Support

Remote DBA

Remote DBA Services

Copyright 1996 -  2013 by Burleson. All rights reserved.

Oracle is the registered trademark of Oracle Corporation.