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?
Discussion posts and replies are publicly visible
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.
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
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;