[英]How can i send reminder message to customer before 2 hours in django/python
I am developing a web app for online ticket buying.我正在开发一个用于在线购票的 web 应用程序。 I used telesign API to integrate sms system.我使用telesign API来集成短信系统。 Now i want a reminder system for my web app, it should send sms to customer before 2 hours of start time of movie.现在我想为我的 web 应用程序设置一个提醒系统,它应该在电影开始时间 2 小时之前向客户发送短信。
You could look at periodic tasks in celery.您可以查看 celery 中的周期性任务。 You could run a task every 15 minutes (or whatever), and scan for imminent start times, and then send your SMS based on that.您可以每 15 分钟(或其他任何时间)运行一次任务,并扫描即将开始的时间,然后根据该时间发送您的 SMS。
If you are deploying to a Cloud platform such as AWS, then there are other mechanisms to achieve the same thing.如果您要部署到 AWS 等云平台,那么还有其他机制可以实现相同的目标。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.