1

I am wondering if there is a way to trigger a procedure by a timed interval. I am trying to create new tables dynamically and have the procedure written to do so, I just need a way to trigger it. I can easily write a python script and run it as a scheduled task. I am wondering if there is a way to do this within MySQL server. I know MS Server has server agent, I am wondering if MySQL server has something similar?

EDIT:

blockheads comment below worked. Should be noted that this only works on MySQL Server 5.1 or later

CREATE EVENT myEvent ON SCHEDULE EVERY INTERVAL 5 minutes DO CALL myProcedure();
Richard
  • 15,152
  • 31
  • 85
  • 111

1 Answers1

1

Try the Event Scheduler

blockhead
  • 9,655
  • 3
  • 43
  • 69