duannao3819 2010-08-23 12:33
浏览 33
已采纳

在Gearman安排一份特定日期和时间的工作

From what I can see Gearman does not support scheduled jobs or delayed jobs. I was thinking that perhaps the scheduled job could be queued in at first and then added to the Gearman queue after the at time period has expired.

at tasks are persistent as they are written as files to a directory in the spool directory of the server. So the only bottle neck would potentially be a simple script to add the task to the Gearman queue because at can't be distributed across servers. Passing it to Gearman to process the actual job means I can get proper job logging etc.

Is this the best way to approach this and do you have any alternative ideas?

The reason I have opted for Gearman over other queue solutions is that it has a PHP extension.

The code I am writing is used to maintain a queue of emails that need to be sent out. So I may specify that I want to send an email to example@example.org at 9.50 on Friday for example.

  • 写回答

3条回答 默认 最新

  • du9843 2010-09-01 12:52
    关注

    I have decided to go the at route as originally laid out in my question. For the purpose I have written a little PHP wrapper for the at binary and tested it on Ubuntu. If you are interested it can be found on github: http://github.com/treffynnon/PHP-at-Job-Queue-Wrapper

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

报告相同问题?

悬赏问题

  • ¥15 基于PLC的三轴机械手程序
  • ¥15 多址通信方式的抗噪声性能和系统容量对比
  • ¥15 winform的chart曲线生成时有凸起
  • ¥15 msix packaging tool打包问题
  • ¥15 finalshell节点的搭建代码和那个端口代码教程
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 海浪数据 南海地区海况数据,波浪数据