2014-08-28 128 views

回答

0

我不會爲此提供一個選項,但是您可以使用「run_at」參數:保存創建作業時的時間,以及創建下一個時,將該數字拉出,添加任何延遲你想要的,然後運行你的工作(再次更新「last_run」):

last_run_at = ... # collect the last job time 
run_at = last_run_at + 60000 #supposing time in ms 
Job.create(:payload_object => object, :priority => priority, 
    :run_at => run_at)