سؤال

is there a simple way to run a job once at a specific time in the future using queue_classic and clockwork, something like delayed_jobs

class.delay(run_at: 5.hours.from_now).method(param)
هل كانت مفيدة؟

المحلول

You can easily do this with Toro, which is another job queueing system that runs on Postgres and Ruby.

Here's an example:

MyWorker.perform_at(5.hours.from_now, 'First arg', 'Second arg')

Check out the Scheduled Jobs section of the README for details.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top