SCHEDULE
Automated Job Submission System
Guide and Reference Manual


Previous Contents Index

Part 2
Scheduling Guide

This part of the manual contains a summary of the SCHEDULE line commands as well as an example of a typical job scheduling procedure.


Chapter 4
Line Command Summary

This chapter summarizes the main commands that are available to the command line interface user. SCHEDULE commands may be entered in one of two modes:

  1. SCHEDULE command mode: SCHEDULE commands are entered from the standard prompt and include the SCHEDULE keyword. For example, the ls command would be entered as:


    $ schedule ls 
    

  2. Prompt mode: In prompt mode commands may be entered at a prompt without the SCHEDULE keyword proceeding the command. For example, the lsdir command would be entered as:


                                                                
    # schedule 
     
    Schedule> lsdir 
     
    

4.1 Prompt mode edit commands

When in SCHEDULE prompt mode, the user can utilize command recall and command edit capabilities. Command recall allows the redisplay of previously entered SCHEDULE commands by using the up and down arrow keys. The previous command may be recalled and then edited if necessary to reduce the need for multiple entry of sometimes lengthy commands.

Edit commands are based on the UNIX emacs edit routines. Users familiar with these routines should find it easy to edit and navigate the command line. The following table lists the SCHEDULE command recall and edit commands. Key descriptions seperated by a "+" sign indicate the consecutive entry of the two keys. For example [ESC]+[D] means press Escape and then press D. Key descriptions seperated by "-" indicate the user press the keys simultaneously. For example [CTRL-P] means press Ctrl and P simultaneously.
Action Key
Recall previous command []<uparrow symbol>, [Prev], [Page Up] or [CTRL-P]
Recall next command []<downarrow symbol>, [Next], [Page Down] or [CTRL-N]
Erase previous character [Backspace] or [Delete]
Erase previous word [CTRL-W], [F13], [ESC]+ [H], [ESC]+ [Backspace] or [ESC]+ [Delete]
Erase line [Delete], [Remove] or [F7]
Erase current character [CTRL-D] or [ESC]+ [D]
Move to end-of-line [CTRL-E] or [F11]
Move to beginning-of-line [CTRL-A] or [F12]
Move a word forward [ESC]+ [F]
Move a word backward [ESC]+ [B]
Clear to end-of-line [CTRL-K]
Clear to beginning-of-line [CTRL-X]
Tab [TAB]
Insert mode [INSERT] or [F14]
HELP [HELP] or [PF2]
RETURN [RETURN], [DO], [PF4] or [SELECT]
QUIT [CTRL-C], [CTRL-]<setminus symbol>, [F6] or [CTRL-Y]
EXIT [CTRL-Z] or [F10]

4.2 SCHEDULE command syntax

When you wish to invoke SCHEDULE enter the command SCHEDULE at the prompt, followed by the requested function. The general syntax of the command is indicated by the following format.


 
Schedule> command job_name [-options] 
 

Some of the SCHEDULE line commands are listed below.

Field Description
cpjob copy an entire job definition
mkcal create a new calender definition
mkjob create a new job definition
mkdir create a new directory
rmjob delete a job definition from the SCHEDULE database
lscal display information about the calendars defined
lsjob display information about the jobs defined
lsdir display information about known directories
lsjob allows any one of the three lists (commands, initiates, or prerequisites) to be modified
chjob change any of the fields that make up a job definition
monque monitor the activity on a job queue
subjob submit a job for immediate execution, regardless of any parameter settings
more type out the list sections that can be associated with a job definition
cathist type out historical data about a job

These commands will be discussed in the following sections, grouped by tasks. The most common qualifiers used for these commands are: -log and -confirm. -log causes each completed operation to issue a note to the user. -confirm requests the user to verify a selected job name is correct. Thus, you can enter the command:


 
 
Schedule> incjob dept_query -log 
 
 

To advance the start date of the job DEPT_QUERY to the next scheduled start time. The user gets a message from the system indicating that the job was submitted, because of the qualifier -log .

If you wanted to copy the job definition of DEPT_QUERY to another job named QUERY_ALL, you would have to indicate the job name to be copied from followed by the name of the job to be copied to:


 
 
Schedule> cpjob dept_query query_all 
 
 

This copies all of the job definition data from the source job DEPT_QUERY to the target job QUERY_ALL.

4.3 Creating a job

There are two different ways of creating a job. Any of these can be used to create any job, but you will find that each has its advantages for certain kinds of jobs.

  1. mkjob is the general purpose command for creating a job definition. By specifying the needed qualifiers all the attributes of the job can be set up.
  2. cpjob is useful when there is an existing job similar to the one you want to set up. You can use cpjob to copy the existing job to another name and then make whatever modifications are necessary to the copy.

Adding a job to the SCHEDULE database is a simple matter of adding the basic components. The steps to follow are:

These methods are described in detail in the following sections.

4.3.1 The mkjob command

The mkjob command is an easy way to create a job entry. If you need to set a number of modifying parameters about the days, dates or times of submission add qualifiers. Script commands , prerequisites and initiates can be added after the job has been created by using the SCHEDULE edjob commands.

The schedule mk command is the basic command for building schedules. The real power of this command is in the multiplicity of qualifiers, which set various parameters. The format of schedule mk command is:


 
 
Schedule> mk job_name -options 
 
 

Commonly used qualifiers are listed in

Table 4-1 Commonly used job qualifiers
Field Description
-gen=comment:``any text string'' Any useful description, up to 100 characters in length.
-gen=restart:number The number of automatic restarts allowed if the job fails. The default is 0 or no-restarts allowed.
-gen=next_submit:date Next date and time that a job will be submitted for execution at.
-sub=queue:name Name of the batch queue to submit the job into.
-sub=parameter:(``p1'',``p2'',...) Parameter values to pass to the job when submitting the job.
-resch=interval:delta Time interval to add to start time to arrive at next start time.
-resch=marked:letter Letter indicating which days to submit the job on.
-resch=named:names Indicates on what days a job is to start on given their names. The known names are MONDAY through SUNDAY, MONTH_START, MONTH_END, YEAR_START and YEAR_END.
-resch=time_of_day:<pm symbol> delta Time of day offset interval, used with NAMED or MARKED methods.
-resch=calendar:name The name of the calendar to use when selecting the next start time.

4.3.2 The cpjob command

The cpjob command is the simplest way to create a job, but also the most limited, in that there must already be a similar job available to copy. You use SCHEDULE cpjob to copy the existing job to another name called the target job. SCHEDULE cpjob copies everything about the source job to the target job: parameters, a prerequisite list, an initiate list, and script commands. Then you can make whatever modifications you want to the copy, using the commands chjob, insjob, or edjob.

The format for cpjob is:


 
 
Schedule> cpjob source_job target_job -qualifiers 
 
 

The only options allowed are the general SCHEDULE options, -confirm and -log.

4.4 Creating a calendar

A calendar indicates what days to run or not to run a particular job. Any number of calendars can be setup. Three calendars are automatically set up when you install the system. They are STANDARD, WORKDAYS and HOLIDAY all are in the system wide /default/ directory.

The simplest way to create a calendar is to issue a command of the following format:


 
 
Schedule> mkcal my_special_calendar 
 
 

Some of the commonly used qualifiers are listed
Qualifier Description
-comment=``any text string'' Any descriptive text string. Up to 100 characters.
-workdays Only workdays count.
-noworkdays All days count (i.e. a standard calendar.)

4.5 Creating a directory

Information in the SCHEDULE database is grouped into directories. Directories can be up to two levels deep (i.e. only a top-level and a sub-level can be specified). The default top level directory is your user name.

If you are just starting to use SCHEDULE then you will most likely have to create your top level directory1.

The format of the create command to make a top level directory is:


 
 
Schedule> mkdir /top_level_name/ 
 
 
 
Schedule> mkdir /smith/ 
 
 

To tell the system the current default SCHEDULE directory to use just define the following logical.


 
 
define schedule_default_directory /smith/ 
 
 

If this is your user name then the above DEFINE statement is unnecessary.

Note

1 If protection settings prevent you from doing this then ask your system manager to do it for you.

4.6 Modifying jobs

The two most common commands to alter a job definition or add new information to it, each with advantages for a given situation are listed below.
Command Description
chjob changes field parameters
edjob modifies any one of the lists

4.6.1 The chjob command

The command chjob can be used to change any of the fields defined in a job definition. Any of the field parameters discussed under the mkjob command can be changed using chjob. The chjob command cannot be used to make changes to the lists of commands, prerequisites, or initiates in a job definition.

The command format is:


 
 
Schedule> chjob job_name  -qualifiers 
 
 

The general options, -log and -confirm, can be used, as well as any of the qualifiers listed in Table 4-1. These options have all been discussed in detail under the individual commands for creating a job entry, so please review the sections on commands for more information about the individual qualifiers.

The following example illustrates a case where the job needs to be modified so that it runs on the last working day of the month. In order to change the flag settings so that the job will submit on the last day of the standard month, enter:


 
 
Schedule> chjob updt_gl3- 
  -resch=(calendar:standard,named:month_end) 
 
 

To make it so that the job runs after the close of working hours on the last day of the month, change the submit time to 9:00 pm (21:00) with:


 
 
Schedule> chjob updt_gl3/resch=time_of_day:21:00 
 
 


Previous Next Contents Index