Initialise variable in trigger function every day at 0800hrs

Rama Tito
Rama Tito used Ask the Experts™
on
Hi Experts,

i do have trigger functions and works accordingly. i want to initialise my variables in trigger function everyday 0800 hrs. How i can do that?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Hi Rama,

The triggers will be fired on DML or DDL opeartions.
In case you want to execute something on 0800 hrs then I suggest to convert in procedure and do whatever you want to do using SQL Agent Job (in case MSSQL Server) .

Best Regards,
Mohit Pandit
Rama TitoProgrammer

Author

Commented:
Hi Mohit Pandit,

I am using Mariadb and it a DML operation. I didn't really get what you meant. Please do assist further.

Regards
Rama tito
ste5anSenior Developer

Commented:
i want to initialise my variables in trigger function everyday 0800 hrs. How i can do that?
By calling your trigger at 08:00 AM.

Otherwise you have a conceptual problem.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Rama TitoProgrammer

Author

Commented:
Hi,

I did try to create event and seems doesn't trigger. In the attachment i have enclose the screen shot
event.png
Senior Developer
Commented:
Wink, wink: "conceptual problem."

i want to initialise my variables in trigger function everyday 0800 hrs
Your question has two parts: initialise my variables in trigger and everyday 0800 hrs.
Variables in a trigger are initialized always when you run your trigger due to the scope of variables. Scheduling does not relate to this.
So the "conceptual problem" is: Why do you think, there is a date/time dependency? You need to elaborate this point first..
Rama TitoProgrammer

Author

Commented:
Thank you, thats triggered me with  date/time dependency.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial