Domanda

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)
È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top