BEGIN
UPDATE phome_ecms_zhibo SET startime = unix_timestamp(now()) , endtime = UNIX_TIMESTAMP(timestampadd(minute, 180, from_unixtime(startime))) WHERE tvid LIKE ‘hunan’;
END
定时结束修改:
ALTER EVENT test(事件名称)
ON SCHEDULE EVERY 1 DAY ENDS ‘2023-02-17 13:12:00’;
备注:在mysql选中用户,再执行命令;要带上执行频率,不知为啥;Navicat上只能加时间,不能直接改。
查看定时任务:
SELECT * FROM mysql.event;
或者
SELECT * FROM information_schema.events;
相关内容:https://blog.csdn.net/sh2018/article/details/104644556
更多参考:https://www.yingsoo.com/news/database/55133.html