cc/td/doc/product/wanbu/bpx8600/9_3_0
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

Managing Jobs

Managing Jobs

A job is a user-specified string of commands. A job can automatically execute on a prearranged schedule or upon an event trigger. This chapter describes the commands that let you:

The system assigns a number to a new job. This job number identifies the job and is a required parameter for most job control commands. When you create a new job, the current privilege level is automatically saved as the privilege level of the job. Only commands that are available at your privilege level can be in your job specification. For example, a user whose highest privilege level is 3 cannot include the addtrk command in a job because addtrk requires a level 1 privilege. This privilege requirement also applies to other job functions, such as running, editing, or stopping a job.

Not all Cisco WAN Switching commands can execute as a part of a job. For this reason, the Attributes section of each command description in this manual states whether the command can function in a job.

Creating (Adding) a Job

Consider the following before creating a job:

Running a Job

The following steps aid in running a job:

Stopping a Job

The following steps aid in stopping a job:

Displaying Jobs

For displaying one or all jobs:

Editing a Job

The following information applies to editing a job. Before using an edited job, test it to ensure that it works.

Deleting a Job

Use the deljob command to delete a job. You cannot delete a job that is running. If necessary, stop the job with the stopjob command before deleting it.

Creating a Job Trigger

The following information applies to creating a job trigger:

Summary of Commands

Table 12-1 shows the full command name and starting page for the description of each command.


Table 12-1: List of Job Commands
Command Description Page

addjob

Add a job

12-5

addjobtrig

Add a job trigger

12-8

deljob

Delete a job

12-11

deljobtrig

Delete job trigger

12-12

dspjob

Display a job

12-13

dspjobs

Display jobs

12-15

editjob

Edit a job

12-17

prtjob

Print a job

12-17

prtjobs

Print jobs

12-20

runjob

Run a job

12-21

stopjob

Stop a job

12-23

addjob

This command creates a new job. When you create a new job with addjob, your privilege level becomes the privilege level of the job itself. When adding commands to the job, you cannot add a command that requires a privilege higher than your privilege level. Furthermore, you must have a privilege level at least as high as the job to run the job (with runjob, for example).

The system does not check the commands' validity with respect to the current state of the network or for relationships to other commands in the job. To ensure that it works as expected, try running the job with runjob.

Full Name

Add a job

Syntax

addjob [description] [execution time, execution interval] <commands>

Related Commands

deljob, dspjob, dspjobs, editjob, prtjob, runjob, stopjob

Attributes

Privilege Jobs Log Node Lock

1-6

No

Yes

IGX, BPX

Yes

Example 1

addjob

Description

The system response is a series of prompts requesting details of the job. The system requests a job description (or name), an execution time for the job, a unit for the interval at which the job is to run (hours, for example), the number of units in the interval, the commands to execute, and what to do with the result.

alpha TRM YourID:1 IGX 8420 9.2 Aug. 16 1998 14:15 PST Job 1 test Last Execution Results: None Status: Idle Next Execution Time: 08/17/97 20:20:30 Interval: 1 days 1: prtlog - Failure Reaction: Repeat 2 Times and Abort Exec. Results: None Last Command: addjob Next Command:

In this example, a new job is being created. The job number is "1." The job description (or name) is "test." The job is scheduled to run on August 17, at 2:20:30 PM and every day thereafter at the same time. The command in the job is prtlog. If this command fails when the job runs, it tries twice again and aborts if unsuccessful.

The "Enter Cmd" prompt at the bottom of the screen indicates you can enter the next command for the job. To exit addjob, press Return without entering a command.


Table 12-2: addjob—Parameters
Parameter Description

command

Specifies the syntax for a command to include in the job. The number of commands that can be included in a job is limited only by available memory.

Not all commands can be included in a job. A job cannot contain commands that are above your privilege level. For example, if you have privilege level 3, your job cannot include the addtrk command because this command requires privilege level 1.

failure reaction

Specifies the desired reaction to the failure of a command in the job. Each command in the job must have a failure reaction. The failure reaction is specified in the following format <c | a | rc | ra> <number of repetitions>. In this format:

c specifies that the job continues running.

a specifies that the job must abort.

rc specifies that the command should retry for the specified number of times and continue running the job even if the command fails during the retries.

ra specifies that the command should retry for the specified number of times and abort the job if the command always fails during the retries.


Table 12-3: addjob—Optional Parameters
Parameter Description

job description

A user-specified description of the job. This description can be up to 16 characters, including spaces.

execution time

Specifies the date and time to run the job. Without an execution time, the job can begin running only by the runjob command.

Execution time is specified in the following format. (The seconds parameter is optional.)

year (four digits)
month (two digits)
day
hour (0-23)
minute
[seconds]

execution interval

Specifies an interval between job repetitions. The three possible execution intervals are:

d (days)
h (hours)
m (minutes)

The interval range is 1 minute to 45 days. If you do not specify an execution interval, the job runs once at execution time. If you specify an execution interval (d, h, or m), you must also specify the number of units in the interval.

addjobtrig

Configures a job to run if a failure or repair occurs on a trunk (narrowband or broadband), a line (voice, data, Frame Relay, ATM, narrowband, broadband), or a T3 (DS3). You can also use addjobtrig to allocate or release bandwidth from other connections. This bandwidth decision depends on whether the EIA lead status is "up" or "down." For example, a job can be triggered to run if the RTS lead of an HDM/LDM port changes state. If the FRM you are using is an FRM-T1 or E1, it qualifies as a line and can be used as a job trigger.

A line failure is any alarm condition that takes the trunk or line out of service. Such a condition is always a major alarm. However, not all major alarms cause the trunk or line to be considered failed. Those that are considered failed are the ones that appear on the dsptrks or dsplns screens with a color associated with it, such as "Major - Local All Ones" or "Major - Remove Packet Out of Frame (Yel)". Specifically excluded are all the statistical alarms, some of which may be major.

A line repair is the opposite of a line failure. A repair of a line occurs when the alarms on the line are removed.

In this release, the lead type on HDM/LDM is based on the configuration from cnfleadmon. The display now show Front Card Supports Lead State Trap.

Full Name

Add a job trigger

Syntax

addjobtrig <job_number> <line_type> <line_specifier> <fail/repair>

Related Commands

addjob, dspjob, dspjobs

Attributes

Privilege Jobs Log Node Lock

1-5

No

No

IGX, BPX

Yes

Examples

addjobtrig

1 p 14 f

trigger job 1 when TRK 14 fails

addjobtrig

3 c 15 r

trigger job 3 when CLN 15 repairs

addjobtrig

2 p 14 r

trigger job 2 when TRK 14 repairs

addjobtrig

3 d 27 E f

trigger job 3 when DS3 27 E (East) fails

alpha TRM YourID:1 IGX 8420 9.2 Aug. 16 1998 14:22 PST Job Description Next Execution Status Interval Access Group 1 test 08/17/97 11:00:00 Idle 1 days Group 1 Trigger 1 - CLN 14 REPAIR Last Command: addjobtrig 1 c 14 r Next Command:
Example 2

addjobtrig 1 c 14 r

Description

Trigger job 1 whenever a repair of line 14 occurs.


Table 12-4: addjobtrig—Parameters
Parameter Description

job number

Specifies the number of the job to trigger.

line type

Specifies the type of line. A "p" indicates any type of trunk (TRK). A "c" indicates any type of circuit line. (A "d" indicates a DS3 line. Do not specify the "d" option, as this represents a now-obsolete card—the MT3.)

line specifier

Specifies the slot number for trunks and lines. Use the standard nomenclature to designate trunks and lines. For example, depending on the card type (single-line or multi-line), specify either <slot.port>, or just <slot>.

fail/repair

Specifies whether the trigger occurs on the failure or repair of a line.

fail/repair

If the card is an SDP, LDP, HDM, or LDM, the fail and repair triggers occur only on the transitions of RTS (regardless of whether the port is DCE or DTE). If you select fail, the trigger is the transition of RTS from on to off. If you select "repair," the trigger is the transition of RTS from off to on.

To enable triggering on leads other than RTS, use the cnfict command.

deljob

Deletes a job. To delete a job, you must have a privilege level at least as high as the job itself. A job that is currently running cannot be deleted. If necessary, use stopjob to stop the job so that you can delete it.

Full Name

Delete a job

Syntax

deljob <job_number>

Related Commands

addjob, dspjob, dspjobs

Attributes

Privilege Jobs Log Node Lock

1-6

No

Yes

IGX, BPX

Yes

Example 1

deljob 4

Description

Delete job 4.

pubsigx1 TN SuperUser IGX 32 9.2 Sep. 3 1998 19:54 GMT Job 4 Last Execution Results: None Status: Locked Next Execution Time: Interval: 1: prtlog - Failure Reaction: Abort Exec. Results: None 2: dncd 6 - Failure Reaction: Repeat 12 Times and Abort Exec. Results: None 3: dncd 6 - Failure Reaction: Repeat 12 Times and Continue Exec. Results: None This Command: deljob 4 Delete this job (y/n)?


Table 12-5: deljob—Parameters
Parameter Description

job number

Specifies the number of the job.

deljobtrig

Deletes a job trigger. The deljobtrig command deletes one trigger at a time. If you delete a job by using the deljob command, all associated job triggers are deleted.

Full Name

Delete a job trigger

Syntax

deljobtrig <job_number> <trig_num>

Related Commands

addjobtrig, dspjobs

Attributes

Privilege Jobs Log Node Lock

1-6

No

Yes

IGX, BPX

Yes

Example 1

deljobtrig 1 1

Description

Delete job trigger 1 for job 1.

pubsigx1 TN SuperUser IGX 32 9.2 Sep. 3 1998 18:19 GMT Job Description Next Execution Status Interval Access Group 1 test1 Idle SuperUser Trigger 1 - PLN 2 FAILURE 2 Idle SuperUser 3 test3 09/02/97 11:11:11 Idle 1 days SuperUser 4 Idle SuperUser 5 Idle SuperUser 6 Idle SuperUser This Command: deljobtrig 1 Enter trigger number:


Table 12-6: deljobtrig—Parameters
Parameter Description

job number

Specifies the number of the job.

trigger number

Specifies the number of the trigger to delete.

dspjob

The dspjob command displays the following information about a job.

This command requires at least the same privilege level as the person who created the job.

Full Name

Display jobs

Syntax

dspjob <job_number>

Related Commands

addjob, deljob, dspjob

Attributes

Privilege Jobs Log Node Lock

1-6

No

No

IGX, BPX

No

Example 1

dspjob 2

Description

Display job number 2.

System Response
alpha TRM YourID:1 IGX 8420 9.2 Aug. 16 1998 14:17 PST Job 1 test Last Execution Results: None Status: Idle Next Execution Time: 08/17/97 20:20:30 Interval: 1 days 1: prtlog - Failure Reaction: Repeat 2 Times and Abort Exec. Results: None Last Command: dspjob 1 Next Command:


Table 12-7: dspjob—Parameters
Parameter Description

job number

Specifies the the number of the job to display.

dspjobs

Displays the following information on each job:

To see details of an individual job, use the dspjob command.

Full Name

Display jobs

Syntax

dspjobs

Related Commands

addjob, deljob, dspjob

Attributes

Privilege Jobs Log Node Lock

1-6

No

No

IGX, BPX

No

Example 1

dspjobs

Description

Display a summary of all jobs stored at the node.

System Response
alpha TRM YourID:1 IGX 8420 9.2 Aug. 16 1998 14:16 PST Job Description Next Execution Status Interval Access Group 1 test 08/17/97 20:20:30 Idle 1 days Group 1 Last Command: dspjobs Next Command:

editjob

Allows you to change any of the following items in a job:

After you enter the editjob command, the system displays the template for the job. With editjob, you can edit, delete, or add a command. Each item in the template is successively displayed on the command line so that you can confirm or change the item.

You cannot change the privilege level of a job.

The following is a list of actions you can take with editjob:

When commands are added to or deleted from a job, the system re-numbers the commands. To test an edited job, run it with the runjob command.

Full Name

Edit a job

Syntax

editjob <job_number>

Related Commands

addjob, deljob, dspjob, dspjobs, runjob

Attributes

Privilege Jobs Log Node Lock

1-6

No

Yes

IGX, BPX

Yes

Example 1

editjob 1

Description

Edit job 1. The template for job 1 appears on the screen. The system displays the existing job description, which you can change or keep. To keep it, press Return. The system then displays the execution time. To change it to August 17, 1998 at 11:00:, for example, enter:

1998 8 17 11 00

If no other items need changing, press the Return key.

System Response
alpha TRM YourID:1 IGX 8420 9.2 Aug. 16 1998 14:19 PST Job 1 prtlog Last Execution Results: None Status: Editing Next Execution Time: 08/17/97 11:00:00 Interval: 1 days 1: prtlog - Failure Reaction: Repeat 2 Times and Abort Exec. Results: None 2: Last Command: editjob 1 Next Command:


Table 12-8: editjob—Parameters
Parameter Description

job number

Specifies the number of the job to edit.

prtjob

Prints the following information about a specific job:

To print a job, you must have at least the same (or higher) privilege level as the person who wrote the job). See the addjob description for more information. The prtjob command uses the same syntax and prints the same information the dspjob command.

Full Name

Print job

Syntax

prtjob <job_number>

Related Commands

dspjob

Attributes

Privilege Jobs Log Node Lock

1-6

Yes

No

IGX, BPX

Yes

prtjobs

Prints the following information about all existing jobs:

For a printout on a single job, use the prtjob command. This command uses the same syntax, and prints the same information as is displayed using the dspjobs command. See the dspjobs command for syntax and output information.

Full Name

Print jobs

Syntax

prtjobs

Related Commands

dspjobs

Attributes

Privilege Jobs Log Node Lock

1-6

No

Yes

IGX, BPX

Yes

runjob

Runs a job. The runjob command runs a job regardless of its execution time. The runjob command does not change a Job's assigned execution time.

When you enter runjob, the system displays the job template and prompts, "Run this job (y/n)?" Enter "y" to start the job. Enter "n" to exit runjob.

After you enter y,. four seconds pass before a job begins running. Press any key briefly to suspend a job. Four seconds of no keyboard activity must pass before the jobs resume. While a job is running, the system highlights the current command and updates command results.

You can include the runjob command in a job. Therefore, running one job can cause another job to run. The only limitation is that a job cannot cause itself to run. For example, Job 1 cannot include the command "runjob 1." Also, Job 1 cannot include the command "runjob 2" if Job 2 contains the command "runjob 1."

Full Name

Run a job

Syntax

runjob <job_number>

Related Commands

addjob, dspjobs, editjob, stopjob

Attributes

Privilege Jobs Log Node Lock

1-6

Yes

Yes

IGX, BPX

Yes

Example 1

runjob 1

Description

Run job 1

System Response
alpha TRM YourID:1 IGX 8420 9.2 Aug. 16 1998 14:23 PST Job 1 test Last Execution Results: None Status: Idle Next Execution Time: 03/17/96 11:00:00 Interval: 1 days 1: prtlog - Failure Reaction: Repeat 2 Times and Abort Exec. Results: None This Command: runjob 1 Run this job (y/n)?


Table 12-9: runjob—Parameters
Parameter Description

job number

Specifies the number of the job to run.

stopjob

Stops all running and all waiting jobs. When you enter the stopjob command, the system prompts, "Stop all running and waiting jobs (y/n)?" Enter a "y" to stop running jobs and prevent all waiting jobs from beginning. Enter an "n" to exit stopjob. Because the stopjob command can leave a task partially executed, use stopjob with caution. You must have at least the same or higher privilege level of the creator of the jobs you want to stop.

Full Name

Stop job

Syntax

stopjob

Related Commands

runjob

Attributes

Privilege Jobs Log Node Lock

1-6

No

No

IGX, BPX

No

Example 1

stopjob

Description

Stop all jobs currently running or queued to run on the node. Confirm by entering: y.

System Response
alpha TRM YourID:1 IGX 8420 9.2 Aug. 16 1998 14:24 PST Job 1 test Last Execution Results: None Status: Idle Next Execution Time: 03/17/96 11:00:00 Interval: 1 days 1: prtlog - Failure Reaction: Repeat 2 Times and Abort Exec. Results: None This Command: stopjob Stop all running and waiting jobs (y/n)?


hometocprevnextglossaryfeedbacksearchhelp
Posted: Mon Aug 19 21:33:44 PDT 2002
All contents are Copyright © 1992--2002 Cisco Systems, Inc. All rights reserved.
Important Notices and Privacy Statement.