需要在特定时间进行工作

编程入门 行业动态 更新时间:2024-10-26 02:25:05
本文介绍了需要在特定时间进行工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试创建一个作业,以便向Twilio呼叫发送通知,因此,拥有一个可靠的解决方案以确保作业在特定时间运行很重要(我不认为被搁置了)排入队列就足够准确了.

I'm trying to create a job in order to send a notification to a Twilio call, therefore it is important to have a robust solution that can make sure jobs are run at a specific time (I don't think being put into a queue is accurate enough).

此类任务的最佳解决方案是什么?

What is the best solution for this type of a task?

这些通知需要在通话中的特定时间发生.例如还剩1分钟".因此,它必须能够:

These notifications need to happen at a specific time in the call. Such as "1 minute left". Therefore it needs to be able to:

  • 在任意时间(1:22 PM或2:45 AM)运行
  • 由用户输入定义(他们设置通话时间)
  • (如果该解决方案可以在Heroku上运行,那就太好了

    (It would be nice if that solution could run on Heroku)

    推荐答案

    对于您提到的特定情况,我认为您应该尝试delay_job: github/collectiveidea/delayed_job#readme

    For the specific case that you have mentioned, I think that you should give delayed_job a try: github/collectiveidea/delayed_job#readme

    它具有run_at选项,您可以在其中指定要运行作业的时间.

    it has a run_at option where you can specify the time at which you want to run the job.

    更多推荐

    需要在特定时间进行工作

    本文发布于:2023-11-24 12:24:50,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1625186.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:时间   工作   在特定

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!