문제

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