XY BLOG

XY的BLOG

MySQL 创建定时任务

Published on in Posts
Updated on
Short link: https://b.xyzt07.cn/s/14
Share this post
A ⇄ 文
⚠️ This entry is already over one year old. It may no longer be up to date. Opinions may have changed.
CREATE DEFINER = `swcd1243`@`%` EVENT `1243`.`del_custom`
ON SCHEDULE
EVERY '1' DAY
ON COMPLETION PRESERVE
DO update fa_custom set deletetime=2 where lasttime+90*86400<unix_timestamp()  and deletetime is null;