Home » SQL & PL/SQL » SQL & PL/SQL » Firing a Trigger on a time
Firing a Trigger on a time [message #425604] Sat, 10 October 2009 01:00 Go to next message
AHMADF124
Messages: 30
Registered: January 2008
Location: KSA
Member

Hi;
I am having a trigger that is checking the hire date and sysdate and if the employee working days are 80 days then an email will be sent to HR manager, Employee manager to remind them about the evaluation of this person since he is in the probation period. The problem is how to fire the trigger from the DB every day at 00:00.

Best Regards,,,

[MERGED by LF with a topic posted in the Forms forum]

[Updated on: Sat, 10 October 2009 10:57] by Moderator

Report message to a moderator

Re: Firing a Trigger on a time [message #425606 is a reply to message #425604] Sat, 10 October 2009 01:09 Go to previous messageGo to next message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
May be, you can make one scheduler which runs everyday at 00:00.
In that scheduler, you can call one procedure, which will fire a mail as per your requirement.

regards,
Delna
Re: Firing a Trigger on a time [message #425609 is a reply to message #425604] Sat, 10 October 2009 01:16 Go to previous messageGo to next message
Michel Cadot
Messages: 63810
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
DBMS_JOB
UTL_MAIL

Regards
Michel

[Updated on: Sat, 10 October 2009 01:17]

Report message to a moderator

Re: Firing a Trigger on a time [message #425610 is a reply to message #425604] Sat, 10 October 2009 01:23 Go to previous messageGo to next message
mamalik
Messages: 266
Registered: November 2008
Location: Pakistan
Senior Member

Dear ,
Create a job/Schedule for this. What have you written in your DB Trigger? Will you like to post your code here?

Regards.
Asif.
Re: Firing a Trigger on a time [message #425614 is a reply to message #425604] Sat, 10 October 2009 03:25 Go to previous message
Littlefoot
Messages: 20827
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Wrong tool, in my opinion. What you should do is to write a stored procedure which will do the processing (as well as e-mailing). Schedule it with DBMS_JOB (or DBMS_SCHEDULER, if on 10g or above) package.

[EDIT, after topics have being merged: "wrong tool" refers Forms]

[Updated on: Sat, 10 October 2009 10:59]

Report message to a moderator

Previous Topic: HELP WITH EASY SELECT DECODE ROUND
Next Topic: Read Images from DB server
Goto Forum:
  


Current Time: Thu Sep 29 14:14:24 CDT 2016

Total time taken to generate the page: 0.05874 seconds