Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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?

share|improve this question
    
What do priorities have to do with time-scheduling? Have you considered something like Akka's scheduler? –  Frank Jan 16 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 at 21:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.