Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Can a Trigger run at a fixed time

Re: Can a Trigger run at a fixed time

From: Bricklen <bricklen-rem_at_yahoo.comz>
Date: Tue, 09 Dec 2003 21:54:59 GMT
Message-ID: <TwrBb.44843$bC.25906@clgrps13>


Sean Chang wrote:
> How about put the time condition inside the trigger code, like
>
> create or replace trigger My_trigger
> after insert or delete or update of My_table
> for each row
> when (to_number(to_char(sysdate, 'HH24') ) not between 8 and 17)
> begin
>
> ---do somthing here
> end;
>
>
> "richard green" <green_24_at_hotmail.com> wrote in message
> news:811617d5.0312081250.67ca893_at_posting.google.com...
>

>>Hi,
>>  I want to do some insert/delete/update operations at 5 PM everyday.
>>Is it possible to write a trigger that will do that. Or do I need to
>>create a Stored Procedure which is invoked by a cron job?
>>
>>Thanx
>>richard

>

Maybe I'm having a mental lapse here, but isn't a trigger fired by an EVENT? I fail to see how it is reliable to have your trigger fire at specific times, if there is no event to cause the trigger to fire in the first place.

That being said, it makes sense to just schedule these actions to occur at your desired point(s) in time using a SP and dbms_job. Received on Tue Dec 09 2003 - 15:54:59 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US