Previous | Contents | Index |
A job which is currently in the K queue (Submitted for execution) or the L queue (Execution started) can be aborted either through a SCHEDULE
Schedule> catque k,l Scheduling queue K: Submitted for execution Scheduling queue L: Execution started 119. /demo/d/a1 (1559) Execution queue entry 695 |
Then enter either of the following commands:
Schedule> chque -entry=119 -abort $ delete -entry=695 |
This will cause the job to terminate with a FAILURE result status. Since job A1 was configured for both BROADCAST and MAIL notification upon a FAILURE result, within a few seconds the following messages appear on the screen:
Reply received on DWS from user SYSTEM at DWS Batch 09:59:48 /demo/d/a1 - Job failed New mail on node DWS from CLUSTR::SYSTEM "Job scheduler" |
The mail message appears as follows:
#1 13-DEC-1996 09:59:57.22 NEWMAIL From: CLUSTR::SYSTEM "Job scheduler" To: JDOE CC: Subj: /demo/d/a1 - Job failed ------------------------------------------------------------------ S C H E D U L E Event Notification /demo/d/a1 - Job failed Desription: Job /demo/d/a1 Startup check before database update Current time 13-DEC-1996 09:59:49.90 Set id 1560 Set tag Set parameter Scheduling entry 0 Started 13-DEC-1996 09:59:10.43 Finished 13-DEC-1996 09:59:34.31 Status %X00048084 %JBC-F-JOBABORT, job aborted during execution ------------------------------------------------------------------ Job A1 has failed. Correct the cause of the failure and manually resubmit job A1. |
5.4 Review events of job execution
The events that occurred during the execution of the jobs are saved in
a history database. These events can be reviewed by displaying a simple
listing on the screen or by generating a formated report.
5.4.1 Simple listing
To output a simple listing on the screen of job completion events from the last 24 hours, use the following commands:
Schedule> cathist /demo/d/* -queue=r -from=now-24 -to=now /demo/d/a1 December 5, 1996, 12:39 R Msg comp /demo/d/a2 December 5, 1996, 12:41 R Msg comp /demo/d/a3 December 5, 1996, 12:41 R Msg comp /demo/d/b1 December 5, 1996, 12:43 R Msg comp /DEMO/D/B21 December 5, 1996, 12:44 R Msg comp /demo/d/b22 December 5, 1996, 12:45 R Msg comp /demo/d/b23 December 5, 1996, 12:45 R Msg comp /demo/d/b24 December 5, 1996, 12:46 R Msg comp /demo/d/f December 5, 1996, 12:48 R Msg comp /demo/d/g December 5, 1996, 12:47 R Msg comp /demo/d/h December 5, 1996, 12:49 R Msg comp /demo/d/i December 5, 1996, 12:50 R Msg comp Schedule> cathist /demo/d/b21 -queue=r -from=now-24 -to=now -full /demo/d/b21 December 5, 1996, 12:44 R Msg comp 655 /demo/d/b21 (1484) step:0 tag:"" param:"" node:DWS queue:DWS$BATCH entry:322 strt:December 5, 1996, 12:42 Sts:00030001 CPU:5 Elps:99 IO:252 Flts:1821 Ppg:4675 |
5.4.2 Report writer
To generate a formatted report of selected events from the last 24
hours, use the following command:
Schedule> report schh_user_allevent_all_80 -submit Output: Directory: /demo/d/ Job: * Minimum set id: 1 Maximum set id: 99999 From log date: NOW-24 To log date: NOW Queue list: E*,R*,U* Job SCHH_USER_ALLEVENT_ALL_80 (queue SYS$BATCH, entry 561) started on SYS$BATCH |
See the chapter on report generation for a complete description of what reports are available and what information to supply in the command.
This will produce a report listing with the default file name of SCHH_USER_ALLEVENT_ALL_80.LIS with the following contents:
ISE, INC. ISE, Inc. SCHEDULE V4.0 December 5, 1996, 13:49 Summary of events Page 1 selected by all settings (SCHH_USER_ALLEVENT_ALL_80) Log date Event Job name Set id Cpu time Io count 12- 5-96 12:39 U Msg started /demo/d/a1 1,484 4.25 218 12- 5-96 12:39 R Msg comp /demo/d/a1 1,484 5.04 276 12- 5-96 12:40 U Msg started /demo/d/a2 1,484 4.37 196 12- 5-96 12:41 R Msg comp /demo/d/a2 1,484 5.19 254 12- 5-96 12:41 U Msg started /demo/d/a3 1,484 12- 5-96 12:41 R Msg comp /demo/d/a3 1,484 12- 5-96 12:43 U Msg started /demo/d/b1 1,484 4.70 189 12- 5-96 12:43 U Msg started /demo/d/b21 1,484 4.72 190 12- 5-96 12:43 R Msg comp /demo/d/b1 1,484 5.54 250 12- 5-96 12:44 U Msg started /demo/d/b22 1,484 4.69 192 12- 5-96 12:44 R Msg comp /demo/d/b21 1,484 5.61 252 12- 5-96 12:45 U Msg started /demo/d/b23 1,484 4.54 188 12- 5-96 12:45 R Msg comp /demo/d/b22 1,484 5.58 253 12- 5-96 12:45 R Msg comp /demo/d/b23 1,484 5.38 251 12- 5-96 12:46 U Msg started /demo/d/b24 1,484 4.42 196 12- 5-96 12:46 R Msg comp /demo/d/b24 1,484 5.22 259 12- 5-96 12:47 U Msg started /demo/d/g 1,484 4.46 196 12- 5-96 12:47 U Msg started /DEMO/D/F 1,484 4.45 194 12- 5-96 12:47 R Msg comp /demo/d/g 1,484 5.24 258 12- 5-96 12:47 E Wtfr prereqs /demo/d/h 1,484 12- 5-96 12:48 R Msg comp /demo/d/f 1,484 5.23 256 12- 5-96 12:48 U Msg started /demo/d/h 1,484 4.47 216 12- 5-96 12:49 R Msg comp /demo/d/h 1,484 5.22 282 12- 5-96 12:49 U Msg started /demo/d/i 1,484 4.56 195 12- 5-96 12:50 R Msg comp /demo/d/i 1,484 5.35 258 |
In SCHEDULE number of calendars can be defined. Some can be setup to be used system wide. Others just to be used by jobs inside a particular directory. The main purpose of a calendar definition is to assist in determining when to automatically reschedule a job.
For example you have a job that is to run every 3 days. Along with this interval you define a calendar which describes which days are allowed. This job may not be allowed to run on weekends. These two bits of information are used to control this automatic rescheduling process.
Calendar data is managed and maintained using the following commands.
Command | Description |
---|---|
cpcal | copy a calendar definition |
mkcal | create a new calendar definition |
rmcal | delete a calendar definition |
lscal | list known calendar definitions |
chcal | modify a calendar definition |
mvcal | rename a calendar definition |
morecal | type out the days in the calendar |
When a calendar is mentioned in a job definition it is found by the following method:
Once a calendar has been found the flag settings are examined to see if one of the HOLIDAY flags is set. If so, a HOLIDAY calendar is located using the same three steps listed above. Once the holiday calendar has been found it is merged into the selected calendar to form the final calendar that will be used for rescheduling.
Copy a calendar file.The cpcal command will copy a calendar definition into another named calendar definition.
cpcal [-options] from_name to_name
Alternatecopy -calendar [-options] from_name to_name
-[no]log
-[no]confirm
-node = node_name
#1 |
---|
Schedule> cpcal /dst/weekdays /sdey/wkdays -log copied /dst/weekdays to /sdey/wkdays |
-confirm
-noconfirm
CONFIRM requests that the user be prompted prior to any operation to verify that the selected entry is the correct one.-node=target_node
The hostname option specifies what hostname (either local or remote) you want the operation performed on. -hostname may be substituted for -node.-log
-nolog
The LOG qualifier causes each completed operation to issue a note to the user.
Modify a calendar definition.The chcal command will change any of the fields that make up a calendar definition.
chcal [-option = value] calendar_name
Alternatemodify -calendar [-option = value] calendar_name
applicable to the calendar header entry:
-owner = uic
-protection = (ugo+/-rwx)
-comment = "any text string"
-[no]workdays [= noholiday, noweekend]
-flags = noholiday_runs, noweekend_runs, skip, slide
-fiscal = starting month
applicable to the calendar month detail record
-date = date to change
-mark = letter or letters
-[no]run
-standard_date
general qualifiers:
-log
-confirm
-node = target node
#1 |
---|
Schedule> chcal /mlevy/fun_days -fiscal=july -log modified /mlevy/fun_days |
-comment="any text string"
The COMMENT option is any useful description that you may want to add. This is an 80 character option.-confirm
-noconfirm
CONFIRM requests that the user be prompted prior to any operation to verify that the selected entry is the correct one.-date=date to change
The DATE option is used to change a date on a calendar. The presence of the DATE option selects a detail record modification.-node=target_node
The hostname option specifies what hostname (either local or remote) you want the operation performed on. -hostname may be substituted for -node.-fiscal=starting month
The FISCAL option specifies which month is to begin the fiscal year. The default setting is January. The month may be entered as a number (1-12) or as text (e.g. "June").-flags=noholiday_runs, noweekend_runs, skip, slide
The FLAGS option allows the user to specify dates on which a job is to run. The various flags are:
Flag Description NOHOLIDAY_RUNS No jobs will run on a holiday NOWEEKEND_RUNS No jobs will run on a weekend SKIP Skip runs on disallowed days SLIDE Slide run forward on disallowed days Whenever multiple flags are used, they must be enclosed in parentheses.
-log
-nolog
The LOG qualifier causes each completed operation to issue a note to the user.-mark="markings"
The MARK option is used to mark certain days on a calendar.-owner=[UID,GID]
The OWNER option specifies the owner user id and group id code for the calendar.-protection:[who]+permission
-protection:[who]-permission
The PROTECTION qualifier modifies the read, write and execute permissions of specified calendars.who specifies whether permissions are being defined for user(u), group(g) or all others(o).
permission specifies the permissions being defined. Read permission(r) allows reading. Write permission (w) allows the ability to write out a new version. Execute permission(x) allows execution of jobs and calendars, search of directories.-run
-norun
The NORUN option s marks the specified day as one on which no runs are allowed.-standard_date
The STANDARD_DATE option indicates that the date provided with the -date option is a standard date. This is useful when modifying a particular date of a workday calendar. Only the work days of such a calendar have numbers. To mark a specific day using a standard date (i.e. the date from a wall calendar) this option must be provided.-workdays[=noholiday(d), noweekend(d)]
-noworkdays
The WORKDAYS option specifies which days a job will not run. The default settings are NOHOLIDAY and NOWEEKEND. To change a day on a WORKDAYS calendar that is not included in the defined workdays use the STANDARD_DATE option . Either noholiday, noweekend or both may be used.
Display on-line information.The lscal command will display all or just selected portions of the calendar database.
lscal [-options] calendar_name
Alternatedirectory -calendar [-options] calendar_name
-check
-column=number
-comment
-node = node_name
-fiscal
-flags
-full
-noheading
-notrailing
-out
-owner
-protection
-env=[prefix_string,format]
-template=/schedule_library/template_db.schedule
-workdays
#1 | |
---|---|
Schedule> lscal * -full
|
-check
Workgroup Jobs Only. The CHECK option displays the designated object's status on the nodes in the current workgroup. Any differences are displayed as:
node_name: differentAdding the -log qualifier displays the specific differences between the object(s) on specific nodes. Ex:
\least_busy_4\job_job1.hdr CWG: okay DWG: different Prv_Owner (215)= /0xc000000e/ Owner (015)= /0xc000000d/ AWG: okay-columns=number
The COLUMNS option specifies how many columns to use when listing just the item name. The default is four columns.-comment
The COMMENT option displays any useful description that you may have added.-node=target_node
The hostname option specifies what hostname (either local or remote) you want the operation performed on. -hostname may be substituted for -node.-fiscal
The FISCAL option displays which month is to begin the fiscal year.-flags
The FLAGS option displays what special features are enabled. The various flags are:
Flag Description NOHOLIDAY_RUNS No jobs will run on a holiday NOWEEKEND_RUNS No jobs will run on a weekend -full
The FULL option requests a display of all control information available on a calendar.-noheading
The NOHEADING removes the heading information from the directory listing.-notrailing
The NOTRAILING removes the trailing information from the directory listing.-owner
The OWNER option displays the owner UIC code for the job.-output=output_file
The OUTPUT option sends all output to a text file. Output can be printed or displayed as needed.-protection
The PROTECTION qualifier displays the read, write and execute permissions of specified calendars.who specifies whether permissions are being displayed for user(u), group(g) or all others(o).
permission specifies the permissions being displayed. Read permission(r) allows reading. Write permission (w) allows the ability to write out a new version. Execute permission(x) allows execution of jobs and calendars, search of directories.-env[=prefix_string] or [=(prefix_string,format)]
The environmental variable option requests that all calendar information be output to a file containing a list of enviroment variables. Every field in the control record is listed in the file as an environment variable. The environment variable name is constructed by prefixing the field name with the provide string. If none is provided a default value of SM is used.The format defines the way that environmental variables are output. The default output specification is: "$export %s=\" %s\" "" (ksh), "$setenv %s=\" %s\" "" (csh) which produces the following format style.
SM_FLAGS = "Slide_over_disallowed"Alternate output styles may be created by changing the format field.
-template=/schedule_library/template_db.schedule
The template option formats the directory output as it is defined in the template file /schedule_library/template_db.schedule . This output can be used for a variety of reasons and can be output to a file using the OUTPUT option . The supplied template file extracts all database information into a format suitable for insertion if desired.-workdays
The WORKDAYS option displays which days a job is to run.
Previous | Next | Contents | Index |