0% found this document useful (0 votes)
38 views25 pages

Sched Language

This document provides the syntax and usage guidelines for job streams and jobs in IBM Tivoli Workload Scheduler. It describes the various keywords and arguments used to define attributes, dependencies, timing, and other execution properties for job streams and the jobs within them. Key elements include schedule, freedays, on, at, until, deadline, every, follows, and end. The document also provides examples of how to structure job streams and define jobs using this syntax.

Uploaded by

bravichandra24
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views25 pages

Sched Language

This document provides the syntax and usage guidelines for job streams and jobs in IBM Tivoli Workload Scheduler. It describes the various keywords and arguments used to define attributes, dependencies, timing, and other execution properties for job streams and the jobs within them. Key elements include schedule, freedays, on, at, until, deadline, every, follows, and end. The document also provides examples of how to structure job streams and define jobs using this syntax.

Uploaded by

bravichandra24
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 25

Scheduling Language

Syntax for job streams


• A job stream begins with a schedule keyword followed by attributes and dependencies. The
colon delimiter introduces the jobs that comprise the job stream. Each job has its own attributes
and dependencies.
• schedule [cpu#]sched
• [freedays Calendar_Name [-sa] [-su] ]
• on {date| day | calendar | request}[,...] [fdignore | fdnext | fdprev] [on {date| day | calendar | request}[,...] [fdignore | fdnext
| fdprev]] [,...]
• [deadline time [timezone|tz tzname][+n day[s] [,...] [except{date| day | calendar}[,...] [fdignore | fdnext | fdprev] ] [,...]
• [at time[timezone|tz tzname][+ n day [s] ] ] [,...]
• [carryforward]
• [follows { [cpu#] sched [. job] [,...] } ]
• [keysched]
• [limit number]
• [needs resource]
• [opens file]
• [priority number]
• [prompt name|text]
• [until time [timezone|tz tzname][+n day[s]] [onuntil action]
:
Syntax for job streams
• job-statement
• [at time[timezone|tz tzname][+ n day [s] ] ] [,...] [confirmed]
• [deadline time [timezone|tz tzname][+n day[s] [,...]
• [every rate]
• [follows job|jstream]
• [keyjob]
• [needs resource]
• [opens file]
• [priority number]
• [prompt name|text]
• [until time [timezone|tz tzname][+n day[s]]
• [onuntil action] [job-statement...]
• End
Continued
Do not attempt to write job streams on a single line, since they will be rejected by the schedulr
command after having been apparently accepted by composer. For instance, writing the
following schedule in one line:

SCHEDULE cbdbu01#NN_CBCID1001YS31 ON CBZZ0001 PRIORITY 10 FOLLOWS


cbdbu02#NN_CBTND10011501:cbdbu01#JN_CBCID1001YS1GA1 PRIORITY 10
OPENS "/st01/st01if/in/CUBCIFYS1GA1001.dat.ok"

will result in an error being returned when the schedule is processed by schedulr.
For this example, you should do one of the following:
Use composer to:
Create a filename from schedule=cbdbu01#NN_CBCID1001YS31 (or all the schedules that are
defined in this way).

Run composer add filename


Split the schedule in the following way:
SCHEDULE cbdbu01#NN_CBCID1001YS31 ON CBZZ0001 PRIORITY 10 FOLLOWS
cbdbu02#NN_CBTND10011501:cbdbu01#JN_CBCID1001YS1GA1 PRIORITY 10
OPENS "/st01/st01if/in/CUBCIFYS1GA1001.dat.ok"
At
• at time [timezone|tz tzname][+n day[s]] [,...]
• Arguments
time Specifies a time of day. Possible values can range from 0000 to 2359.
tzname Specifies the time zone to be used when computing the start time. See Appendix B,
“Managing time zones,” on page 319 for time zone names. The default is the time zone of the
workstation on which the job or job stream is launched.
Note: If an at time and an until time are specified, the time zones must be the same.
n Specifies an offset in days from the scheduled start date and time.
• Usage Notes If an at time is not specified for a job or job stream, its launch time is determined
by its dependencies and priority.
• Examples The following examples assume that the IBM Tivoli Workload Scheduler processing
day starts at 6:00 a.m.
• The following job stream, selected on Tuesdays, is launched no sooner than 3:00 a.m.
Wednesday morning. Its two jobs are launched as soon as possible after that time. schedule
sked7 on tu at 0300: job1 job2 end
• The time zone of workstation sfran is defined as Pacific Standard Time (pst), and the time zone
of workstation nycity is defined as Eastern Standard Time (est). The following job stream is
selected for execution on Friday. It is launched on workstation sfran at 10:00 a.m. pst Saturday.
job1 is launched on sfran as soon as possible after that time. job2 is launched on sfran at 2:00
p.m. est (11:00 a.m. pst) Saturday. job3 is launched on workstation nycity at 4:00 p.m. est
(1:00 p.m. pst) Saturday.
• sfran#schedule sked8 on fr at 1000 + 1 day : job1 job2 at 1400 tz est nycity#job3 at 1600 end
Carryforward
• Makes a job stream eligible to be carried forward to the next day’s production plan if
it is not completed before the end of the current day’s production plan.
• Synopsis carryforward
• Examples The following job stream is carried forward if its jobs have not completed
before pre-production processing begins for a new day.
schedule sked43 on th
carryforward
:
job12
job13
job13a
end
Comments
• Includes comments in a job stream definition.
• Synopsis *text | <<text>>
• Arguments
*text Inserts a comment line. The first character in the line must be an asterisk.
<<text>> Inserts comment text on a line. The text must be enclosed in double
angle brackets.

Examples The following example includes both types of comments:


*****************
* The weekly cleanup jobs
****************************************
* schedule wkend on fr at 1830
carryforward
:
job1 <<final totals and reports>>
job2 <<update database >>
end
Confirmed
• Specifies that a job’s completion must be confirmed by executing a Conman confirm
command.
• Synopsis
• Confirmed
• Examples In the following job stream, confirmation of the completion of job1 must
be received before job2 and job3 are launched.
schedule test1 on fr:
job1 confirmed
job2 follows job1
job3 follows job1
end
Deadline
• Specifies the time within which a job or job stream must complete. Jobs or job streams that have not yet started or
that are still running when the deadline time has expired, are considered late in the plan. When a job (or job
stream) is late, the following actions are performed:
• Job is shown as late in Conman and Job Scheduling Console.
• An event is sent to the Tivoli Enterprise Console and the IBM Tivoli Business Systems Manager.
• A message is issued to the stdlist and console logs.
• Synopsis
• deadline time [timezone|tz tzname][+n day[s] [,...]
• Arguments
• time Specifies a time of day. Possible values can range from 0000 to 2359.
• tzname Specifies the time zone to be used when computing the deadline. The default is the time zone of the
workstation on which the job or job stream is launched.
• n Specifies an offset in days from the scheduled deadline time.
• Examples
• The following example launches job stream sked7 everyday and job jobc to start running at 14:30 and to be
completed by 16:00.
schedule sked7 on everyday : jobc
at 1430 deadline 1600
end
End
• Marks the end of a job stream definition.
• Synopsis end
• Examples
schedule test1 on monthend
:
job1
job2
job3
end << end of job stream >>
Every
• Defines the repetition rate for a job. The job is launched repeatedly at the specified
rate. If the job has a dependency that is not satisfied, the iteration is started when
the dependency is satisfied.
• every rate
• rate The repetition rate expressed in hours and minutes, in the format:
• hhmm. (The rate can be greater than 24 hours.)
• The following example runs the job
testjob every hour: testjob every 100
• The following example runs the job
• testjob1 every 15 minutes, between the hours of 6:00 p.m. and 8:00 p.m.:
testjob1 at 1800 every 15 until 2000
• The job will run at 1800, 1815, 1830, and so on. If the job is submitted adhoc at
1833, the reruns will be at 1833,1834,1845 and so on.
• The following example does not start the job testjob2 iteration until the job testjob1
has completed successfully:
testjob2 every 15 follows testjob1
Except
• Defines the dates that are exceptions to the on dates of a job stream.
• Synopsis
except {date| day | calendar } [fdignore | fdnext | fdprev][,...] [except {date|
day | calendar }] [fdignore | fdnext | fdprev][,...]]

The following example selects job stream testskd2 to run every weekday except
those days whose dates appear on calendars named monthend and holidays:
schedule testskd2 on weekdays except monthend,holidays
The following example selects job stream testskd3 to run every weekday except
May 15,1999 and May 23, 1999:
schedule testskd3 on weekdays except 05/15/99,05/23/99
The following example selects job stream testskd4 to run every day except two
weekdays prior to any date appearing on a calendar named monthend:
schedule testskd4 on everyday except monthend-2 weekdays
Follows
• follows Defines the other jobs and job streams that must complete successfully
before a job or job stream is launched.
• Synopsis Use the following syntax for job streams:
follows [netagent::][wkstation#]jstream[.jobname | @] [,...] Use the following
syntax for jobs: follows [netagent::][wkstation#]jstream{.jobname | @} | jobname
[,...]

schedule skedc on fr
follows site1#sked4,site2#sked5.joba

sked6 follows cluster4::site4#skedx.jobx


Freedays
Enables you to specify the name of a freedays calendar that lists the days when the job stream
should not run. Tivoli Workload Scheduler uses this calendar as the base calendar for calculating
workdays for the job stream. The keyword affects only the scheduling of the job streams for
which it is specified.

Synopsis freedays Calendar_Name [-sa] [-su]

Select job stream sked2 to run on 01/01/2001 and on all workdays as long as they are not listed in
the freedays calendar named GERMHOL.
schedule sked2
freedays GERMHOL
on 01/01/2001, workdays
job statement
• Job statements place jobs in a job stream and define job dependencies. In a job statement, you
can also include job attributes and recovery options that add a new job or modify an existing job
in the database.
Synopsis [wkstation#]jobname
[description “text”]
[scriptname filename | docommand “commandline”]
[streamlogon username]
[interactive]
[rccondsucc ″Success Condition″]
[recovery {stop | continue | rerun}
[after [wkstation#]jobname] [abendprompt “text”] ]
[job-dependency [,...]]
Keyjob
• The keyjob keyword is used to mark a job as key or critical in both the database and
daily plan and for monitoring by applications, such as Tivoli Business Systems
Manager.

SCHEDULE cpu1#sched1
ON everyday
KEYSCHED
AT 0100
cpu1#myjob1 KEYJOB
END
Keysched
• The keysched keyword is used to mark a job stream as key or critical in both the database and
daily plan and for monitoring by applications, such as Tivoli Business Systems Manager .
Limit
• Limits the number of jobs that can run simultaneously in a job stream
• limit joblimit

schedule sked2 on fr
limit 5 :
Needs
• Defines resources that must be available before a job or job stream is launched.
• needs [n] [wkstation#]resourcename [,...]

schedule sked3 on fr

needs 3 cputime,2 tapes :


On
• This is a required job stream keyword that defines when and how often a job stream
is selected for execution. The on keyword must follow the schedule keyword.

• on {date| day | calendar | request}[,...] [fdignore | fdnext | fdprev][,...] [on


{date| day | calendar | request}[,...] [fdignore | fdnext | fdprev]][,...]
• The following example selects job stream sked1 on Mondays and Wednesdays:
schedule sked1 on mo,we
• The following example selects job stream sked3 on June 15, 1999, and on the dates
listed on the apdates calendar:
schedule sked3 on 6/15/99,apdates
Opens
• Specifies files that must be available before a job or job stream can be launched.
• opens [wkstation#]″filename″ [(qualifier)] [,...]
Priority
• Sets the priority of a job or job stream.
• Synopsis
priority number | hi | go
Prompt
• Specifies prompts that must be answered affirmatively before a job or job stream is
launched.
• Synopsis
prompt promptname [,...]
prompt ″[: | !]text″ [...]
Schedule
• Specifies the job stream name. With the exception of comments, this must be the
first keyword in a job stream, and must be followed by the on keyword.
• Synopsis
schedule [wkstation#]jstreamname on ...
Until
• Specifies the latest time a job or job stream will be launched.
• Synopsis
until time [timezone|tz tzname][+n day[s]] [onuntil action]

onuntil action Specifies the action to be taken on a job or job stream whose until time has expired,
but the job or job stream has not yet started. The following are the possible values of the action
parameter:
suppr The final job stream state is HOLD if the job stream contains at least one every job.
Otherwise the final state is calculated using the normal rules and the jobs with the option
onuntil suppr are considered in SUCC state when the until time occurs, even if their
dependencies have actually not been released.
cont The job or job stream runs when all necessary conditions are met and a notification message is
written to the log when the until time elapses.
canc A job or job stream is cancelled when the until time specified expires. Any job or job stream
that was dependent on the completion of a job or job stream that was cancelled, will run
because the dependency no longer exists.

You might also like