CREATE EVENT `set_trips_finished`
ON SCHEDULE EVERY 1 DAY STARTS '2015-08-25 01:50:00'
ON COMPLETION PRESERVE
DO BEGIN
UPDATE trips
SET status = 0
WHERE date(created_at) < curdate();
END;
is the scheduled task. But the fields don't get updated. When I run just the query - the fields get updated fine.
I have another scheduled task, with the very same syntax, just scheduled to run a 5 minutes later, and it runs fine.
I don't understand why wouldn't this task run, or whether the query does not update the table... Any suggestions?
Update
I deleted the other scheduled task (the one that was working), and set them both again, and now neither fires...
See if event scheduler is even running:
nope
Create my test table:
Create my event:
List all events by schema name:
Look at data that might get status updated:
Well I can wait all day long, events aren't even turned on
Wait a few minutes (note my event runs every minute)
Event has run 3 times. Ok, looks good.