如何在Windows中安排mysql存储过程? [英] How to schedule a mysql stored procedure in windows?
本文介绍了如何在Windows中安排mysql存储过程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
需要计划在Windows 2003 Server中每周运行一次MySql存储过程.我尝试使用批处理文件,但是它对我有用.有任何想法吗?感谢ADV.
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.
推荐答案
您是否正在运行mySQL 5.1或更高版本?如果是这样,请使用 mysql事件.
Are you running mySQL version 5.1 or later? If so use a mysql event.
例如:
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.
这篇关于如何在Windows中安排mysql存储过程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文