Bala
Bala

Reputation: 277

How to schedule a mysql stored procedure in windows?

Need to schedule in windows 2003 server to run a MySql Stored Procedure weekly once. I tried with batch file but it dint work for me. Any ideas? Thanks in ADV.

Upvotes: 0

Views: 4680

Answers (1)

O. Jones
O. Jones

Reputation: 108676

Are you running mySQL version 5.1 or later? If so use a mysql event.

For example:

CREATE EVENT MY_WEEKLY_THING
ON SCHEDULE EVERY 1 WEEK STARTS '2010-09-19 23:30:00'
DO CALL MY_STORED_PROCEDURE;

Your server will need to be up and running at the time mentioned, of course.

Upvotes: 3

Related Questions