Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Schedule at a specific time with delayed job

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}
like image 994
Ace Dimasuhid Avatar asked Sep 04 '13 16:09

Ace Dimasuhid


1 Answers

Figured it out. You can run delayed_job by passing run_at as a param to delay.

  class.delay(run_at: 5.hours.from_now).method(param)
like image 77
Ace Dimasuhid Avatar answered Sep 23 '22 00:09

Ace Dimasuhid