12

Is there a way to schedule a job at a specific time with delayed_job through the "delay" method, not through handle_asynchronously? Something like:

  class.delay.method(param), :run_at => Proc.new {time}
4

1 回答 1

22

弄清楚了。您可以通过将 run_at 作为参数传递给延迟来运行延迟作业。

  class.delay(run_at: 5.hours.from_now).method(param)
于 2013-09-04T16:16:05.810 回答