特定时间后触发事件 [英] trigger event after specific time
本文介绍了特定时间后触发事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在一定时间后触发事件或功能?
How do you trigger an event or function after a certain time?
例如,有人在网上订购了某样东西,付款截止日期为 2 月 13 日上午 7:45.如果客户在此日期之前没有支付任何费用,他的订单将被自动取消.
For instance, someone ordered something online and it has a payment due date of February 13 7:45AM. When the customer haven't paid anything before this date, his order will be automatically cancelled.
我不知道如何开始编码这种情况.
I don't know how to start coding that kind of situation.
推荐答案
通常,cron 作业将用于管理此类任务;尽管 MySQL 确实有自己的定时事件调度程序
Normally, a cron job would be used to manage tasks like that; though MySQL does have its own timed event scheduler
这篇关于特定时间后触发事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文