Home > Backend Development > PHP Tutorial > mysql 定时任务求助

mysql 定时任务求助

WBOY
Release: 2016-06-06 20:22:24
Original
1225 people have browsed it

<code>CREATE EVENT e_hourly
ON SCHEDULE
EVERY 1 HOUR STARTS ‘ 2007-02-10 23:59:00 ‘ ENDS ‘ 2008-02-10 23:59:00 ‘
DO
DELETE FROM messages limit 10;
</code>
Copy after login
Copy after login

可以帮我写一下 每周三的 00:00 新增一条数据 怎么写时间部分

回复内容:

<code>CREATE EVENT e_hourly
ON SCHEDULE
EVERY 1 HOUR STARTS ‘ 2007-02-10 23:59:00 ‘ ENDS ‘ 2008-02-10 23:59:00 ‘
DO
DELETE FROM messages limit 10;
</code>
Copy after login
Copy after login

可以帮我写一下 每周三的 00:00 新增一条数据 怎么写时间部分

CREATE EVENT e_hourly ON SCHEDULE EVERY 4 WEEK STARTS '2015-09-07 02:00:00' ON COMPLETION PRESERVE DISABLE ON SLAVE DO BEGIN
INSERT INTO xxx(A,B,C) values('1','2','3');
END

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template