http://blog.csdn.net/acmain_chm/article/details/7703870
定时执行mysql数据库任务方案
命题: 每日 02:00 am 定时删除 表 t (id int primary key,ptime TIMESTAMP DEFAULT CURRENT_TIMESTAMP) 中三天以前的记录。 ======================================= 方法一:操作系统 ======================================= (...

解决方案 »

  1.   

    用crontab
    每五分钟*/5 * * * * mysql -uroot -pxxxx dbname -e "call sp_test();"
      

  2.   

    可不可以用mysqwl的定时任务写我主要是不会写这个判断 如果大于5分分钟 就标示为status 1
      

  3.   

    如果 sendtime 的时间 与系统时间相差10分钟以上 update `wifi` set status=1 where sendtime > curdate()-interval 5 minute