Unit 3 Exercise 11
Exercise 11: Instance Properties
Objective
To use different types of Instance Properties in place of hard coded values in the command line.
Summary
Modify Windows Job 4 to use Schedule and Job Instance Properties for the Path
and -t
parameter. Within MY FIRST SCHEDULE, you will create a Schedule Instance Property called Path
with a value of C:\Program Files\OpConxps\MSLSAM
. Within Windows Job 4, you will create a Job Instance Property called TIME
with a numerical value of your choosing.
Instructions
Create the Schedule Instance Property
- In Library > Administration, select Master Schedules.
- In the Schedule list, select My First Schedule.
- Click the Edit button.
- Click the Lock icon in the upper right-hand corner.
- Expand the Instance Definition box
- Click the Add New Property Set button.
- In the Name text box, type
Path
. - In the Value text box, type
C:\Program Files\OpConxps\MSLSAM
. - Click the Check Mark button to verify the the entry.
- Click the Save button.
- Close Studio.
Create the Job Instance Property
- Under Library > Administration, select Master Jobs.
- In the Master Jobs list, select Windows Job 4.
- While holding down the CTRL key, click the Edit button and the job should open in a new tab.
- In the new tab, click the Lock button in the upper right-hand corner.
- Expand Instance Properties.
- Click + Add New Property Set button.
- Click the green + button.
- In the Name field, enter
TIME
. - In the Value field, enter a number of your choice between 10 and 60.
- Click the Check Mark button to verify the the entry.
- click Save.
- Refresh the web page.
Modify the Job to use the Instance Properties
- While still on the Master Job Definition screen for Windows Job 4, click the Lock** button in the upper right-hand corner.
- Expand the Task Details box.
- Locate the Command Line and highlight
C:\Program Files\OpConxps\MSLSAM
. - Using either, the Magic Wand or CTRL+SPACE, pull up the Property Selector window.
- In the Property Selector pop-up window:
- In the Scope field, uncheck Global, Job, and Machine.
- In the Search field, enter
Path
. - Select the Property named, SI.Path.
- Click OK
- Repeat Steps 17-19 to replace the
10
with the Job Instance Property called JI.TIME.
tip
The new command line should look similar to the following:
"[[SI.Path]]\genericp.exe" –t[[JI.TIME]]
- Click Save.
- Close Library.
Build the Schedule
tip
Validate that all the jobs in My First Schedule are in a completed state and that the Schedule Status shows as Completed. As you may need to overwrite the existing schedule during the build process.
- In Operations, click on Schedule Build.
- In the From field, select today's date.
- In the To field, select today's date.
- Select the Released radio button.
- Toggle on the Overwrite Exsisting switch
- In the Schedule List, select My First Schedule.
- Click the Build button.
- Expand and click on the schedule link for My First Schedule to return to the Processes screen.