2

I'm looking for a lightweight system that will let me queue up a one-off (non-recurring) task and have it execute at a specific time in the future.

This is for the backend of a game where the user does tasks that are time-based. I need the server to check the status of the user's "job" at the completion time and perform the necessary housekeeping on their game state.

I'm somewhat familiar with Redis, Celery, Beanstalkd, ZeroMQ, et al., but I haven't found any info on scheduling a single unit of work to be executed in the future. (or pop off the queue at a set time) Celerybeat has a scheduler for cron-type recurring tasks, but I didn't see anything for one-off.

I've also seen the "at" command in *nix, but I'm not aware of any frontend for it that can help me manage the jobs.

I realize there are some easy solutions such as ordering keys in Redis and doing a blocking pop, but I'd like to not have to continuously poll a queue to see if the next job is ready.

The closest I've found is the deferred library on GAE, but I was hoping for something that runs on my own Linux box along with my other components.

I'd appreciate any suggestions!

1
  • In case anyone is interested, I think I found what I was looking for. Beanstalkd has a "delay" parameter that queues a job into a delayed queue and puts it on the ready queue after the specified number of seconds.
    – Scott
    Mar 23, 2012 at 16:06

1 Answer 1

0

Celery allows you to specify a countdown or an ETA at the call of a task to be executed.

The documentation says it best:

http://docs.celeryproject.org/en/latest/userguide/calling.html#eta-and-countdown

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.