If you want to extend your production plan at a fixed time interval,
for example every week, you have the option to automate the extension.
This section explains how you can do this.
Tivoli® Workload Scheduler includes a sample job stream named final that helps you automate plan management. A copy of this job stream
is in the Sfinal file in the TWS_home/config/Sfinal directory. A copy of the job script
is in the TWS_home/JnextPlan directory.
You can use either this
Sfinal file or create
and customize a new one.
Important: In any
case, to be able to run this job stream succesfully, the TWS_user must have Write access to the tmp default temporary directory.
The final job stream runs the sequence
of script files described in JnextPlan to generate
the new production plan. See Creating and extending the production plan for reference.
By default, the
final job stream is set to run
once a day. You can modify the time it runs by modifying two settings
in the
final job stream definition. These are the
details about the two steps you need to follow to do this, for example,
to make the
final job stream run every three days:
- Modify the run cycle by setting inside the final job stream definition to schedule the job stream to run every three
days.
- In the statement that invokes MakePlan inside the final job stream, set the production plan to last for three
days by specifying -for 72.
Then you need to add the
final job stream to the
database by performing the following steps:
- Log in as TWS_user.
- Run the tws_env script to set the Tivoli Workload Scheduler environment as follows:
- UNIX: on C shells launch . .⁄TWS_home/tws_env.csh
- UNIX: on Korn shells launch . .⁄TWS_home/tws_env.sh
- From a Windows command line: launch TWS_home\tws_env.cmd
where TWS_home represents the product installation
directory.
- Run the composer command.
- Add the final job stream definition to the database by running
the following command:
composer add Sfinal
If
you did not use the Sfinal file provided with the
product but you created a new one, use its name in place of Sfinal.
- Start the production cycle by running the JnextPlan script.
In this way the final job stream will be included
in the current production plan.
Note: Even if you decided to automate the production plan extension
you can still run JnextPlan at any time.