Search code examples
ruby-on-railsdelayed-jobqueue-classic

Run job once at a specific time in future using queue_classic


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)

Solution

  • 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.