简体   繁体   English

PHP睡眠功能2天时间?

[英]PHP Sleep Function 2 days time?

I'm trying to find a way to execute a function (send some emails), 2 days after a new table is inserted into the database. 我正在尝试找到一种方法来执行一个函数(发送一些电子邮件),在新表插入数据库2天后。 I would like to do this without cron if possible, so I was wondering if is too wrong to use the sleep function, with 2 days time? 如果可能的话,我想在没有cron的情况下这样做,所以我想知道使用睡眠功能是否错误,2天时间? Or any other suggestion.. 或任何其他建议..

You can use SCHEDULE to set schedule for database query. 您可以使用SCHEDULE为数据库查询设置计划。

Maybe this question is already solved here 也许这个问题已经解决

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM