Cisco Cisco Workload Automation 6.3 User Guide

Page of 78
68
 
Managing Command Parameters
Tracking Methods
To determine whether the jobs completed successfully or not, both jobs will use the Exit code of cmd pipe tracking 
method using the Windows Find command to search for the saved output. The result of the Find command will determine 
the job’s final status. 
You will set up Report Writer 1 to succeed, and Report Writer 2 to fail. You do this by setting the command parameter for 
job Report Writer 1 to OK and the parameter for Report Writer 2 to FAILED.
Creating the Reporting Job Group
To create the reporting job group:
1.
From the 
Navigator
 pane, select 
Definitions>Jobs
 to display the Jobs pane. 
2.
Right-click and select 
Add Job Group
 from the context menu.
3.
In the Job Group Name field, enter 
Reporting
.
4.
Click the 
Schedule
 tab, if not already selected.
5.
From the 
Calendar Name
 list, select 
work day
.
6.
Click 
OK
 to save the job group. 
7.
Click 
Cancel
 at the Effective Date dialog. 
Note: If you click OK at this dialog, the job group enters the production schedule, but nothing will run because there are 
no jobs associated with the job group yet. Clicking 
Cancel
 means the job group will be added to the schedule manually.
Setting the Report Writer 1 Job to Succeed
To set the Report Writer 1 job to succeed:
1.
Right-click the 
Reporting
 job group and select 
Add>Job
 from the context menu.
2.
In the 
Job Name
 field, enter 
Report Writer 1
.
3.
In the 
Command
 field, enter the full path to the Argdemo batch file.
4.
Enter 
OK
 in the 
Command Parameters
 field. This passes as Argument 1 (%1) to the batch file.
5.
Click the 
Run
 tab.
6.
In the 
Tracking
 section, select the E
xit code of cmd pipe
 option.
7.
In the text field below, type 
Find “OK
”. This tells CWA to search through the output of the job for the string “OK”. 
Since “OK” is passed as a command parameter, it will appear in the output.
8.
Click 
OK
.
9.
Click 
Cancel
 in the Effective Date dialog. This job will enter the schedule when manually submit its job group. 
Setting the Report Writer 2 Job to Fail
To set the Report Writer 2 job to fail:
1.
Right-click the 
Report Writer 1
 job in the jobs view.
2.
Select 
Copy Job/Group
 from the context menu.