Resque调度程序将动态设置为在特定时间首次运行

时间:2015-10-28 22:46:31

标签: ruby resque resque-scheduler

您可以动态安排如下:

Create

我想做的是安排第一个在午夜运行说(无需计算first_in偏移量)。

谢谢!

1 个答案:

答案 0 :(得分:1)

Didn't read the docs close enough :) you can set a :cron in dynamic schedules too:

name = 'send_emails'
config = {}
config[:class] = 'SendEmail'
config[:args] = 'POC email subject'
config[:cron] = '*/15 * * * *'
config[:persist] = true
Resque.set_schedule(name, config)