dpjr86761 2015-07-11 05:36
浏览 7
已采纳

如果记录的状态在24小时后没有改变,需要向用户组发送短信和电子邮件吗?

I am using php and Mysql. I have a record in my database and i want to check status value of the record after 24hrs of its insertion if it is still in pending or no changed i want to send an SMS and an Email to some person relevant to the status. To achieve this i have implemented a solution in which i used a php code but it need to continuously execute and check status of record that may cause DoS. In Another solution i create a trigger but i can't able to send db values as parameter to the php file. so what should be its solution????

  • 写回答

2条回答 默认 最新

  • dongmubei7950 2015-07-11 05:55
    关注

    Two ways came into my mind for this.

    First, (the good way) using cronjob. It's a really good way.

    Second, (bad way for your purpose) Check to see which rows has age of 30 days in each request coming to website. There are cons for this way as the website doesn't get visitors for some days then SMS or Emails won't be sent on time. Another bad thing is it executes on every request so loading time and memory will be consumed during this process.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 公交车和无人机协同运输
  • ¥15 stm32代码移植没反应
  • ¥15 matlab基于pde算法图像修复,为什么只能对示例图像有效
  • ¥100 连续两帧图像高速减法
  • ¥15 组策略中的计算机配置策略无法下发
  • ¥15 如何绘制动力学系统的相图
  • ¥15 对接wps接口实现获取元数据
  • ¥20 给自己本科IT专业毕业的妹m找个实习工作
  • ¥15 用友U8:向一个无法连接的网络尝试了一个套接字操作,如何解决?
  • ¥30 我的代码按理说完成了模型的搭建、训练、验证测试等工作(标签-网络|关键词-变化检测)