Professional Documents
Culture Documents
Redwood Cronacle
Topics
Cronacle Architecture
Redwood Explorer
Applications
What is a script?
Command text types
PL/SQL command texts
How to define parameters
Events
File events
2/
GE /
Cronacle Architecture
Process servers Redwood
Repository User Interfaces
UNIX
Redwood™
Explorer
High
Availability
Option
Windows custom
NT build
Open
VMS
XML
Portal
Web Web
Server Server
AS/400
HP300
0
Main
frame
Redwood OutRun only
3/
GE /
Redwood Explorer
4/
GE /
Redwood Explorer (2)
Monitor
• Jobs
Repository
• Application
– Job Chains
– Scripts
• Events
• Destination
• Submit Frames
5/
GE /
Application
6/
GE /
Script
7/
GE /
Script (2)
Mandatory:
• script name and description
• command text
Optional:
• script parameters & constraints
• events to raise and events to wait for
• system parameters
8/
GE /
Command text
9/
GE /
Command text (2)
Operating system command
• 'cat /tmp/export.dmp | grep -i “error“ '
PL/SQL block
• begin
• ...
• ...
• end;
10 /
GE /
Clearing jobs & files
11 /
GE /
Script parameter
12 /
GE /
Script parameter (2)
Name
Type: user, special or system
Description
Optional, runtime, display and command file
Expression for default data (default value)
• constant values
• SYSDATE or USER
• database function (specify owner)
• SELECT statement in brackets
Data type with length, precision and scale
13 /
GE /
Using script parameters
l_id := P_CUSTID;
14 /
GE /
PL/SQL jobs
15 /
GE /
PL/SQL jobs (2)
In a PL/SQL script you can:
• Submit other jobs
• Job dependencies (sequential/parallel)
• Conditional execution (if..then..else)
• Advanced error checking & handling
16 /
GE /
Parent and child jobs
Parent
script
Child
script
Child
script
17 /
GE /
Event
18 /
GE /
Raise an event
Job status
Return code (only for job status = ERROR)
Incoming file
19 /
GE /
Wait for an event
Note:
Note:The
Themove-directory
move-directoryshould
shouldbe
beresiding
residingon onthe
the
same file system as where the incoming file is created.
same file system as where the incoming file is created.
(for
(forperformance
performancereasons)
reasons)
21 /
GE /
Without move directory
Only newest file is detected
New file detection only when event is cleared
22 /
GE /
Job chains
Topics
What is a job chain?
Step
Post-condition
Script call parameters
24 /
GE /
Job chain
25 /
GE /
What is a job chain?
A job chain executes scripts in a sequential or
parallel order using steps.
A job chain comprises:
• Steps
• Script calls & Script call parameters
• Pre- and post-conditions
• Destination calls & Destination call
parameters
A job chain is a special job without job agent
A job chain has no output & log file
26 /
GE /
Job chains Contd.
All definitions are stored in the Redwood
Repository
All script calls are submitted when a chain is
submitted
A job chain has special states (next slide)
A scheduler can shutdown while a job chain
has status WAITING
Job chains do not inherit script call
parameters
27 /
GE /
Job chain states
CHAINED – submitted but not executing yet
28 /
GE /
Restart & Skip steps
Manually
• Re-submit the job chain in HOLD
• Set one or more steps and scripts calls to DISABLED
• Then edit the job chain to SCHEDULE
Automatically
• Use scheduling parameter “Start at specified step”
29 /
GE /
Step
31 /
GE /
Step
Job chain
step 1
Script 1 Script 2
step 2
Script 3
step 3
Script 4 Script 5
32 /
GE /
Post-condition
Post-condition
• Is a "Proceed, exit or loop" condition
• for job chains & steps
• 1 or more post-conditions can be defined
per job chain/step
33 /
GE /
The complete picture
Job chain
step 1
Script 1 Script 2 Post-condition
step 2
Script 3 Post-condition
step 3 Post-condition
Script 4 Script 5
Post-condition
34 /
GE /
Post-condition
35 /
GE /
Post-condition status & action
On status
• Completed
• Canceled
• Error
• Unknown
• Killed
• Otherwise (all other states)
36 /
GE /
Post-condition status & action
Action
• Do nothing
• Continue
• Change status to COMPLETED
• Go to step <step owner> <step name>
• Raise error <error code> <error
message>
• Restart chain (="iteration")
• Request restart from console (=
"Messages monitor")
37 /
GE /
Referring to job chain parameter
Use Expression
Referring job chain parameter can be IN, OUT or
IN/OUT
38 /
GE /
Submit
39 /
GE /
Scheduling parameters
40 /
GE /
What happens?
Define
Defineaascript
script
Submit
Submit
Schedule
Schedule Cronacle
scheduler
Dispatch
Dispatch Edit, re-submit &
monitor
Queue
Queue
Execute
Execute
Final
Finalstate
state
41 /
GE /
Actions upon jobs
42 /
GE /
Editing job parameters
44 /
GE /
Recursive time windows
Enabled during
• e.g. only on Fridays
Disabled during
• e.g. not on holidays
45 /
GE /
Submit frame
Cycle of repetition
Comprises submit intervals
Set for an individual job (at submit time)
46 /
GE /
Submit frame & time windows
47 /
GE /
At original time
At original time property forces original
starting time after reschedule
13:00 13:00 13:00
15:00
13:00 13:00
If not used, submit frame will loose original
time after reschedule 15:00 15:00
48 /
GE /
Queues
All jobs are processed in queues
Queue is served by one or more schedulers
Default queue: system
Queue may have max. no of concurrent jobs
Job Queue
defined
Sche- Sche- Sche- Sche-
duler duler duler duler
49 /
GE /
Priorities & queues
50 /
GE /
Job states
initial
• SCHEDULED, NEVER, CHAINED
execution
• RUNNING, CONSOLE, WAITING, KILLING
waiting
• QUEUED, OVERDUE, HOLD, QUEUEHOLD, EVENTWAIT,
LOCKWAIT, MODIFIED
special
• DELAYED, DELETING, DISABLED, SKIPPED
final
• COMPLETED, CANCELED, KILLED, UNKNOWN, ERROR
51 /
GE /
Job status ERROR
Operating system jobs
• completed if exit code ‘0’
• error if exit code > ‘0’
• Cronacle exit code = operating system exit code
PL/SQL jobs
• ready if no (unhandled) exception occurred
• error if (unhandled) exception occurred
• Cronacle exit code = Oracle error number
52 /
GE /
Operating system account
Unix & OpenVMS
every Cronacle user Cronacle users every Cronacle user
uses a corresponding use two or more uses the same
operating system account operating system accounts operating system account
Dynamic user switching enabled Dynamic user switching enabled NO Dynamic user switching.
(default_os_account set) (All jobs will use the account of
the owner of the executable)
53 /
GE /
Reading files
Cronacle™ Cronacle™
Transaction Servers Repository User Interfaces
UNIX
Cronacle™
Explorer
Windows custom
NT SQL*Net build
ftp
Open
VMS
XML
Portal
Web Web
Server Server
54 /
GE /
Destination
Destination
Normal Destination
Destination Destination
Destination Destination
Destination
Normal
script script
script script
script script
script
script
Format Format
Format Format
Format Format
Format
Format
55 /
GE /
Thank you!
56 /
GE /