|
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.
Consider the following before creating a job:
The following steps aid in running a job:
The following steps aid in stopping a job:
For displaying one or all jobs:
The following information applies to editing a job. Before using an edited job, test it to ensure that it works.
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.
The following information applies to creating a job trigger:
Table 12-1 shows the full command name and starting page for the description of each command.
Command | Description | Page |
---|---|---|
addjob | Add a job | |
addjobtrig | Add a job trigger | |
deljob | Delete a job | |
deljobtrig | Delete job trigger | |
dspjob | Display a job | |
dspjobs | Display jobs | |
editjob | Edit a job | |
prtjob | Print a job | |
prtjobs | Print jobs | |
runjob | Run a job | |
stopjob | Stop a job |
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.
Add a job
addjob [description] [execution time, execution interval] <commands>
deljob, dspjob, dspjobs, editjob, prtjob, runjob, stopjob
Privilege | Jobs | Log | Node | Lock |
1-6 | No | Yes | IGX, BPX | Yes |
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 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.
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. |
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) |
execution interval | Specifies an interval between job repetitions. The three possible execution intervals are:
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. |
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.
Add a job trigger
addjobtrig <job_number> <line_type> <line_specifier> <fail/repair>
addjob, dspjob, dspjobs
Privilege | Jobs | Log | Node | Lock |
1-5 | No | No | IGX, BPX | Yes |
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:
addjobtrig 1 c 14 r
Trigger job 1 whenever a repair of line 14 occurs.
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 cardthe 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. |
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.
Delete a job
deljob <job_number>
addjob, dspjob, dspjobs
Privilege | Jobs | Log | Node | Lock |
1-6 | No | Yes | IGX, BPX | Yes |
deljob 4
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)?
Parameter | Description |
---|---|
job number | Specifies the number of the job. |
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.
Delete a job trigger
deljobtrig <job_number> <trig_num>
addjobtrig, dspjobs
Privilege | Jobs | Log | Node | Lock |
1-6 | No | Yes | IGX, BPX | Yes |
deljobtrig 1 1
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:
Parameter | Description |
---|---|
job number | Specifies the number of the job. |
trigger number | Specifies the number of the trigger to delete. |
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.
Display jobs
dspjob <job_number>
addjob, deljob, dspjob
Privilege | Jobs | Log | Node | Lock |
1-6 | No | No | IGX, BPX | No |
dspjob 2
Display job number 2.
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:
Parameter | Description |
---|---|
job number | Specifies the the number of the job to display. |
Displays the following information on each job:
To see details of an individual job, use the dspjob command.
Display jobs
dspjobs
addjob, deljob, dspjob
Privilege | Jobs | Log | Node | Lock |
1-6 | No | No | IGX, BPX | No |
dspjobs
Display a summary of all jobs stored at the node.
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:
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.
Edit a job
editjob <job_number>
addjob, deljob, dspjob, dspjobs, runjob
Privilege | Jobs | Log | Node | Lock |
1-6 | No | Yes | IGX, BPX | Yes |
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 August 17, 1998 at 11:00:, for example, enter:
If no other items need changing, press the Return key.
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:
Parameter | Description |
---|---|
job number | Specifies the number of the job to edit. |
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.
Print job
prtjob <job_number>
dspjob
Privilege | Jobs | Log | Node | Lock |
1-6 | Yes | No | IGX, BPX | Yes |
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.
Print jobs
prtjobs
dspjobs
Privilege | Jobs | Log | Node | Lock |
1-6 | No | Yes | IGX, BPX | Yes |
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."
Run a job
runjob <job_number>
addjob, dspjobs, editjob, stopjob
Privilege | Jobs | Log | Node | Lock |
1-6 | Yes | Yes | IGX, BPX | Yes |
runjob 1
Run job 1
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)?
Parameter | Description |
---|---|
job number | Specifies the number of the job to run. |
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.
Stop job
stopjob
runjob
Privilege | Jobs | Log | Node | Lock |
1-6 | No | No | IGX, BPX | No |
stopjob
Stop all jobs currently running or queued to run on the node. Confirm by entering: y.
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)?
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.