cc/td/doc/product/wanbu/bpx8600/8_2_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 pre-arranged 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. Upon new job creation, 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 job editing. 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

The following list shows the full command name and starting page for the description of each job command.


Table 14-1:
Mnemonic Description Page

addjob

Add job

14-5

addjobtrig

Add job trigger

14-8

deljob

Delete job

14-10

deljobtrig

Delete job trigger

14-12

dspjob

Display job

14-14

dspjobs

Display jobs

14-16

editjob

Edit job

14-18

prtjob

Print job

14-18

prtjobs

Print jobs

14-21

runjob

Run job

14-22

stopjob

Stop job

14-24

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 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

1-6

Jobs

No

Log

Yes

Node

IPX, IGX, BPX

Lock

Yes

Example 1 Description

addjob

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 IPX 16 8.1 Mar. 16 1996 14:15 PST Job 1 test Last Execution Results: None Status: Idle Next Execution Time: 03/17/96 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 March 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 the Return key without entering a command.


Table 14-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 14-3: addjob - Optional Parameters
Parameter Description

job description

A 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 circuit line, trunk, or T3 (DS3). A line acquires "failed" status when an alarm condition is invoked. A "repair" of a line occurs when the alarms on the line are removed. Jobs can be triggered upon either a failure or repair of a line.

The command also configures a job to allocate or release bandwidth from other connections. This bandwidth decision depends on whether the EIA lead status is "up" or "down."

Full Name

Add a job trigger

Syntax

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

Related Commands

addjob, dspjob, dspjobs

Attributes

Privilege

1-5

Jobs

No

Log

No

Node

IPX, IGX, BPX

Lock

Yes

Example 1 Description

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 IPX 16 8.1 Mar. 16 1996 14:22 PST Job Description Next Execution Status Interval Access Group 1 test 03/17/96 11:00:00 Idle 1 days Group 1 Trigger 1 - CLN 14 REPAIR Last Command: addjobtrig 1 c 14 r Next Command:
Example 2 Description

addjobtrig 1 c 14 r

Trigger job 1 upon repair of circuit line 14


Table 14-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 a trunk (TRK) or packet line. A "c" indicates a circuit line (CLN). A "d" indicates a DS3 line.

line specifier

Specifies the slot number for TRK and CLN lines, or the slot number and DS3 indicator (E or W) for DS3 lines.

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

1-6

Jobs

No

Log

Yes

Node

IPX, IGX, BPX

Lock

Yes

Example 1 Description

deljob 4

Delete job 4.

pubsigx1 TN SuperUser IGX 32 8.1 Sep. 3 1996 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 14-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 a job is deleted by 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

1-6

Jobs

No

Log

Yes

Node

IPX, IGX, BPX

Lock

Yes

Example 1 Description

deljobtrig 1 1

Delete job trigger 1 for job 1.

pubsigx1 TN SuperUser IGX 32 8.1 Sep. 3 1996 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 12/12/96 11:11:11 Idle 1 days SuperUser 4 Idle SuperUser 5 Idle SuperUser 6 Idle SuperUser This Command: deljobtrig 1 Enter trigger number:
Table 14-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

1-6

Jobs

No

Log

No

Node

IPX, IGX, BPX

Lock

No

Example 1 Description

dspjob 2

Display job number 2.

System Response
alpha TRM YourID:1 IPX 16 8.1 Mar. 16 1996 14:17 PST Job 1 test Last Execution Results: None Status: Idle Next Execution Time: 03/17/96 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 14-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

1-6

Jobs

No

Log

No

Node

IPX, IGX, BPX

Lock

No

Example 1 Description

dspjobs

Display a summary of all jobs stored at the node

System Response
alpha TRM YourID:1 IPX 16 8.1 Mar. 16 1996 14:16 PST Job Description Next Execution Status Interval Access Group 1 test 03/17/96 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

1-6

Jobs

No

Log

Yes

Node

IPX, IGX, BPX

Lock

YES

Example 1 Description

editjob 1

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 March 17, 1996 at 11:00:, for example, enter:

  1996 3 17 11 00
If no other items need changing, press the Return key.
System Response
alpha TRM YourID:1 IPX 16 8.1 Mar. 16 1996 14:19 PST Job 1 prtlog Last Execution Results: None Status: Editing Next Execution Time: 03/17/96 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 14-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

1-6

Jobs

Yes

Log

No

Node

IPX, IGX, BPX

Lock

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

1-6

Jobs

No

Log

Yes

Node

IPX, IGX, BPX

Lock

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. Four seconds pass before a job begins running after you enter "y." Pressing any keys briefly suspends a job, and 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

1-6

Jobs

Yes

Log

Yes

Node

IPX, IGX, BPX

Lock

Yes

Example 1 Description

runjob 1

Run job 1.

alpha TRM YourID:1 IPX 16 8.1 Mar. 16 1996 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 14-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

1-6

Jobs

No

Log

No

Node

IPX, IGX, BPX

Lock

No

Example 1 Description

stopjob

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

System Response
alpha TRM YourID:1 IPX 16 8.1 Mar. 16 1996 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: Fri Jan 19 17:03:27 PST 2001
All contents are Copyright © 1992--2001 Cisco Systems, Inc. All rights reserved.
Important Notices and Privacy Statement.