---
title: "mysql 的 定时任务执行情况"
author: "peter2009"
date: "2015-11-05T15:08:23Z"
tags: []
categories: ["数据库"]
slug: "mysql"
draft: false
lastmod: "2015-11-05T15:08:23Z"
id: 2254666
url: "https://peter2009.iteye.com/blog/2254666"
---

```java
CREATE EVENT `event_makefriend`  // 名称
ON SCHEDULE EVERY 1 DAY STARTS '2015-11-05 15:00:00'  //每天15点执行一次
ON COMPLETION PRESERVE  
ENABLE
DO CALL update_friends_state(); 
```