Você está na página 1de 27

TIVOLI SCHEDULER

Contents

What is TWS?

Getting TWS access

TWS Terminology Used

JNextPlan Basic Concepts and Processes

Composer and Conman

How to Define a TWS Job Various Parameters

How to Define a TWS Schedule Various Parameters

Overview of Composer Commands and Usage

Overview of Conman Commands and Usage

Limitations (of file watcher etc.)

What is TWS?

TWS is the preferred scheduler option to automate the batch


processing on Unix systems. It can provide calendar and event
driven workload automation across different platforms.
The Composer program is used to manage scheduling
objects in Workload Schedulers database. Scheduling objects are
workstations, workstation classes, domains, jobs, job streams,
resources, prompts, calendars, and parameters.
Workload Schedulers production plan environment is
managed with the Conman program.
Scheduling language format and keywords to define
job streams for Workload Scheduler.

Getting TWS access

We can get the Tivoli access by raising an eSP request.


The form name is :
U N I X User Account Requests

Levels of TWS Access


A user can have different levels of access within TWS.

1.

Ability to view currently loaded schedules (using conman


commands)

2.

Ability to view and manipulate currently loaded schedules


(using conman commands)

3.

Ability to view schedule definitions (using composer


commands)

4.

Ability to view/add/amend schedule definitions (using


composer commands)

Getting TWS access

Raising an U N I X User Account Requests will provide you


only the ability to view currently loaded schedules (using
conman commands)

`Now for getting further access on your existing tt9p ID, one
has to raise another eSP . The form name is :
T W S User Account Request

This request will provide you access to manipulate currently


loaded schedules and view composer definition of schedules
as well as the calendar definition.

TWS Terminology Used

Workstation
Also referred to as CPU. Usually an individual computer on which jobs and job
streams are run. Workstations are defined in the Tivoli Workload Scheduler
database as a unique object. A workstation definition is required for every
computer that executes jobs or job streams in the Workload Scheduler network.

Job
A script or command, run on the users behalf, run and controlled by Tivoli
Workload Scheduler.

Job Stream
Also referred to as schedule. A mechanism for grouping jobs by function or
application on a particular day and time. A job stream definition includes a launch
time, priorities, dependencies, and job names.

Calendar
An object defined in the Tivoli Workload Scheduler database that contains a list of
scheduling dates. Each calendar can be assigned to multiple job streams.
Assigning a calendar to a job stream causes that job stream to run on the days
specified in the calendar. A calendar can be used as an inclusionary or
exclusionary run cycle.

TWS Terminology Used

Dependency

A condition that must be met in order to launch a job or job stream.

CARRYFORWARD
The CARRYFORWARD option is defined on the schedule if we you want to get the
schedule carried forward for the next days plan. If the CARRYFORWARD option is
not defined, the schedule just died down at the JNextday Plan for next day.

Resource
An object representing either physical or logical resources on your system. Once
defined in the Tivoli Workload Scheduler database, resources can be used as
dependencies for jobs and job streams. For example, you can define a resource
named tapes with a unit value of two. Then, define jobs that require two available
tape drives as a dependency. Jobs with this
dependency cannot run concurrently because each time a job is run the tapes
resource is in use.

TWS Terminology Used

TWS Alert

There are various alerts in Tivoli, we can have a mail sent to a group and an
incident raised in SM7 :
1. Late Start alert
2. Late Finish alert
3. Failure alert

JNextday Plan
The JNextPlan script runs on the master domain manager to generate the
production plan and distribute it across the Tivoli Workload Scheduler network.

Symphony
JNextPlan script creates the new production plan and stores it in a file
named Symphony.

Limit
Limit defines how many jobs can run at a time. Limit can be defined on
Schedule/Workload/Master level.

JNextplan Basic Concepts


and Processes

JNextplan Basic Concepts


and Processes

To generate and start a new production plan Tivoli Workload Scheduler performs
the following steps:

Updates the preproduction plan with the objects defined in the database that
were added
or updated since the last time the plan was created or extended.

Retrieves from the preproduction plan the information about the job streams
to run in the
specified time period and saves it in an intermediate production plan.

Includes in the new production plan the uncompleted job streams from the
previous
production plan.

Creates the new production plan and stores it in a file named Symphony.

Distributes a copy of the Symphony file to the workstations involved in the


new product
plan processing.

Logs all the statistics of the previous production plan into an archive

Updates the job stream states in the preproduction plan.

How to Define a TWS Job Various


Parameters
TWS Job consists of below attributes :

1.

Job Name

Job Name consists of a workload and a meaningful name, separated by the


connector #.
e.g., AREP#AR5ETLA2D02

2.

Scriptname
Scriptname is nothing but the actual command to be run via job.
e.g., SCRIPTNAME rm /wload/arep/home/arepmrz/Test.OK

3.

STREAMLOGON
Streamlogon is the user by which the script will be executed.

e.g., STREAMLOGON arepmrz

How to Define a TWS Job


Various Parameters
TWS Job consists of below attributes :

4.

Description
Description specifies the function of the script
e.g., DESCRIPTION Removes .OK file

5.

Recovery
Recovery part instruct the steps to be taken in case of failure of the job.
e.g., RECOVERY STOP/RERUN/AFTER

How to Define a TWS Schedule Various


Parameters
TWS Schedule consists of below attributes :

1. Schedule Name (SCHEDULE)


Schedule Name consists of workload name and a meaningful name, separated
by the connector #.
e.g.,

2.

SCHEDULE AREP#AREETLA2D01

Schedule Frequency (ON)


Schedule Frequency specifies the dates on which the schedule will execute, like
daily,
weekly, monthly etc

e.g.,

3.

ON MO, TU, WE, TH, FR

Schedule Time (AT)


Schedule Time specifies the time at which the schedule will start searching for
the
dependencies like file dependency, predecessor schedule dependency etc. This
Time is in
BST.

e.g.,

AT 1200

How to Define a TWS Schedule Various


Parameters
4.

File Dependency (OPENS)


OPENS is a keyword used to define a File dependency in TWS. Syntax is as below
:

e.g.,

5.

OPENS AREP#/wload/arep/home/arepmrz/Incoming_File.dat.done

Schedule/Job Dependency (FOLLOWS)


FOLLOWS is a keyword used to define a Schedule or Job dependency in TWS.
Syntax is as below

e.g.,

6.

FOLLOWS AREP#AREETLA2D02.@

Resource Dependency (NEEDS)


NEEDS is a keyword used to define a Resource dependency in TWS. Syntax is as
below

e.g.,

NEEDS AREP#MDE_PRE

How to Define a TWS


Schedule Example
1.
SCHEDULE AREP#AREETLA2D02
ON REQUEST
#ON SU, MO, TU, WE, TH
AT 0200 UNTIL 1900 +1 DAYS ONUNTIL CANC
CARRYFORWARD
OPENS AREP#"/wload/xxxx/app/data_abinitio/interface/arch/xxxx/DBOLCP1.MORFRT"
:
AREP#ETLA2016
SCRIPTNAME "sleep 60"
STREAMLOGON batch_id
DESCRIPTION "CD script to download file"
TASKTYPE UNIX
RECOVERY STOP
NEEDS 1 XXXX#MDE_CD
END

Overview of Composer
Commands
Command

Short Name

Function

Add

Add scheduling object from a file

Authenticate ( used
in composer )

au
username=<>
password=<>

Change User credentials

Continue

Ignore the next error

Create/extract

cr/ex

Create text file from database object file

Delete

de

Delete scheduling object

Display

Display details of scheduling object

edit

ed

Edits file

Exit

Exit Composer

Help

Displays Help command

List

Displays list of database

lock

Locks access to database object

Overview of Composer
Commands
Command

Short Name

Function

modify

Modify scheduling objects

new

Add new scheduling object

print

Print scheduling objects

redo

/ or redo

Edit and rerun the previous command

rename

rn

Change the object name

replace

rp

Replace scheduling objects

unlock

Release a scheduling object lock in the db

validate

val

Validate object definitions in a user file

version

Displays the Composer program banner

Systems
commands

:<
commands>

Invoke operating system commands

Overview of Composer
Commands - Examples
1. Display Schedule

8. Display Job definition

composer d abat#ABAETLGUD001

composer d j=ABAT#ETLC5205

2. Add Schedule/s to database

9. Add Job/s to database

composer add schedules.dat

composer add jobs.dat

3. Modify Schedule definition

10. Modify Job Definition

composer m abat#ABAETLGUD001

composer m j=ABAT#ETLC5205

4. Replace Schedules in Database

11. Replace Job in database

composer replace schedules.dat

composer replace jobs.dat

5. Validate Schedule Definition

12. Validate Job Definition

composer validate schedules.dat

composer validate jobs.dat

6. Delete Schedule/Jobs in database

13. Display TWS Parameter

composer delete
abat#ABAETLGUD001

composer d parms | grep ETLTAFTO


14. Display TWS Resource

7. Display Calendars
composer d r | grep ET_LOAD
composer d calendars

Overview of Conman
Commands
Command
Short Name Function
adddep job

adj

Add a dependency to a job

adddep sched

ads

Add a dependency to a job stream

altpass

altpass

Change a windows user password

altpri

ap

Alter the priority of job or job stream

cancel job

cj

Cancel a job

cancel sched

cs

Cancel a job stream

confirm

confirm

Confirm the state of a job

console

cons

Exit Composer

deldep job

ddj

Delete a dependency on a job

deldep sched

dds

Delete a dependency on a job stream

exit

Exit the conman interface

Overview of Conman
Commands
Command
Short Name
Function

Continued

kill

kill

Kill a job that is in EXEC state

limit cpu

lc

Set the workstation limit

limit sched

ls

Set the limit on a job stream

link

link

Link a workstation

release job

rj

Release dependencies on a job

release sched

rs

Release dependencies on a job stream

reply

reply

Reply to prompts

rerun

rr

Rerun a job (can also rerun FROM)

showcpus

sc

Shows a list of workstations in the env

showjobs

sj

Shows a list of jobs

showpropmts

sp

Shows a list of prompts

showsresources

sr

Shows a list of resources

Overview of Conman
Commands
Command
Short Name
Function

Continued

showschedules

ss

Shows a list of schedules

submit job

sbj

Submit a defined job to a system

submit sched

sbs

Submits a defined job stream to a system

Overview of Conman
Commands - Examples
1. Submit Schedule in Plan
arep#AREETLA2D02;follows=AREP#A
REETLA2D01.ETLA2006
sbs arep#AREETLA2D02

1. Submit Job in Plan


sbj AREP#ETLA2006
2. Cancel a Job In Plan

2. Cancel a Schedule in Plan


can arep#AREETLA2D01.ETLA2006
can arep#AREETLA2D02
3. Alter Priority of a Job
3. Alter Priority of Schedule
ap AREP#AREETLA2D01.ETLA2006;0
ap arep#AREETLA2D02;0
4. Submit a Job on Pri=0
4. Submit Schedule on Pri=0
sbj AREP#ETLA2006;pri=0
sbs arep#AREETLA2D02;pri=0
5. Rerun a Job in a Schedule
5. Show Schedules
rr AREP#AREETLA2D01.ETLA2006
ss arep#AREETLA2D02
ss arep#@A2@

6. Show CPU

6. Show Jobs in a Schedule

sc | grep AREP

sj arep#AREETLA2D02

7. Show Resource

7. Release Schedule
release arep#AREETLA2D02

sr | grep ETL_LOAD

Overview of Conman
Commands - Examples
Add Dependencies

Delete Dependencies

1. Of a Schedule/Job

1. Of a Schedule/Job

adddep
arep#AREETLA2D02;follows=AREP#AR
EETLA2D01.ETLA2006

deldep AREP#AREETLA2D02;
follows=arep#AREETLA2D01.ETLA2006
2. Of a File

2. Of a File
adddep
arep#ARETELA2D02;OPENS=AREP#"/wl
oad/arep/app/abinitio_disks/landing/seri
al/RIS/ris_gpu_inbound/ukba/risgpu_tbl6
_*.dat.DONE"

deldep
arep#ARETELA2D02;OPENS=AREP#"/wl
oad/arep/app/abinitio_disks/landing/seri
al/RIS/ris_gpu_inbound/ukba/risgpu_tbl6
_*.dat.DONE"
3. Of a Resource

3. Of a Resource
adddep
AREP#AREETLA2D02.ETLA2016;NEEDS
1 AREP#MDE_CD

deldep
AREP#AREETLA2D02.ETLA2016;NEEDS
1 AREP#MDE_CD

4. Of a Time

4. Of a Time

adddep arep#AREETLA2D02;AT=2000

deldep rep#AREETLA2D02;AT=2000

5. Confirm Success a Job :- conf REP#AREETLA2D01.ETLA2006;succ


6. Submit with an alias :- sbs
arep#AREETLA2D02;alias=AREETLA2D02_06

TWS Limitations
Below points detail the limitations in TWS 8.4:
1.

File Dependency Length of File name


Name of the file in File Dependency should be 28 characters max, we can use * as wild
character.

e.g.,

2.

OPENS AREP#"/wload/arep/app/data_abinitio/interface/arch/triumph/DBOLCPA.CPSACH*"

Name of Resource
Resource name should be 8 characters max

e.g.,

3.

NEEDS MDE_LOAD

Limitations of schedule Dependencies


The max number of schedule dependencies on a schedule is 60.

Food For Thought : Various Live Scenarios


1. Is it possible to cancel a schedule automatically if the source file is not arrived till
particular time?
2. Is it possible to include 2 jobs from different workloads in a single schedule?
3. Is it possible to load a schedule on 1 st day of the month, but keep Start Time of 5th
day of the month?
4. Can we re-run a job multiple times a day automatically?
5. Can we customize the alert message generated by Tivoli?
6. How a TWS alert gets generated?
7. Is Positive Alerting possible in Tivoli? Can we generate an alert through Tivoli if a
job is Successful?
8. How can we control the number of jobs running at a time?
9. Is there a limit on the total number of dependencies in a job?
10. What happens if a job is executing and the JNextPlan starts?

Questions
???

THANK YOU !!!

Você também pode gostar