Say you're running a website which generates a large number of tasks that should be run at particular times (e.g. reminder emails).

You could run a cron which SELECTs a database table for unprocessed events before the current time (or even a long running process that polls the table), but this seems messy. On the other hand, as far as I know most producer/consumer messaging systems don't support arbitrary priorities.

How to approach this?

  • What do priorities have to do with time-scheduling? Have you considered something like Akka's scheduler? – Frank Jan 16 '14 at 7:05
  • Isn't time scheduling just a specific type of priority queue? (i.e. where the lower time has a higher priority?) Nope, hadn't seen Akka (thanks); I come from a non-JVM background. Will look into it, though in this case the tasks are coming from Python. From looking solely at the scheduler docs I don't understand how it persists the queue, but I assume that just means I need to read the doco from the start. – james.haggerty Jan 16 '14 at 21:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.