chained jobs

From: helter skelter <helterskelter_at_gmail.com>
Date: Mon, 08 Dec 2008 15:46:16 +0100
Message-ID: <ghjc7s$fk5$1@mx1.internetia.pl>


hi,

How to set condition to evaluate 1min after start of step_1? I've got this:

BEGIN
DBMS_SCHEDULER.DEFINE_CHAIN_RULE (

    chain_name   =>   'my_chain',
    condition    =>   'TRUE',
    action       =>   'START my_step_1',
    rule_name    =>   'my_rule_1',
    comments     =>   'start the chain');
DBMS_SCHEDULER.DEFINE_CHAIN_RULE (
    chain_name   =>   'my_chain',
    condition    =>   ':my_step_1.duration >= INTERVAL ''1'' minute',
    action       =>   'START my_step_2',
    rule_name    =>   'my_rule_2',
    comments     =>   'start my_step_step_2 after 2m');
    DBMS_SCHEDULER.DEFINE_CHAIN_RULE (
    chain_name   =>   'my_chain',
    condition    =>   'my_step_1 succeeded and my_step_2 succeeded',
    action       =>   'START my_step_3',
    rule_name    =>   'my_rule_3',
    comments     =>   'start my_step_step_3 after succede 1 i 2');
       DBMS_SCHEDULER.DEFINE_CHAIN_RULE (
    chain_name => 'my_chain',
    condition => 'my_step_1 completed and my_step_2 completed and my_step_3 completed',
    action       =>   'END',
    rule_name    =>   'my_rule_4',
    comments     =>   'end');

END;
/

and this:

BEGIN
DBMS_SCHEDULER.CREATE_CHAIN (

    chain_name          => 'my_chain',
    rule_set_name       => NULL,
    evaluation_interval => INTERVAL '1' minute,
    comments            => 'My first chain');
END;
/

It doesn't work. Step 2 doesn't start 1min after start of step 1, but when step 1 is sompleted. What's wrong? Thanks for any advice

oracle 10gr2, linux Received on Mon Dec 08 2008 - 08:46:16 CST

Original text of this message