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

mysql 定时任务求助

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-06 20:22:241242browse

<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>

可以帮我写一下 每周三的 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>

可以帮我写一下 每周三的 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

Statement:
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