Skip to main content
manjit.1486
October 7, 2024
Question

Scheduler/Calendar

  • October 7, 2024
  • 2 replies
  • 0 views

Hello All,

I need to create a Scheduler which marks all the existing records under in table against column Is_observed = 1 at the end of each year starting December 31, 2024.

Is this good to go?

2 replies

October 8, 2024

Yes, It is the correct way. As the process runs only once a year on the mentioned date and the value of Is_observed will becomes 1 if there is no error in your PM.

kumara0180
October 8, 2024

You can also try to do this 

CREATE EVENT yearly_event
ON SCHEDULE
  EVERY 1 YEAR
  STARTS '2023-12-31 16:00:00'
DO
  BEGIN
    -- Your event logic goes here
    SELECT 'This event runs every year on December 31st at 4 PM';
  END;


This will help you create an event in Maria DB which would be running to update at specific date and time