chrisdavies/Sparc.MongoQueue — Issue #1: Allow for scheduled tasks.
Author: chrisdavies
Created: 2012-01-21 04:26:13+00:00
State: open

Instead of (or maybe in addition to) "updated", have an "expires" date which is the time that the task is available again to be worked.

e.g.
{
recurEveryNSeconds = (24 * 60 * 60),
scheduledTime = DateTime
expires = DateTime.Now.AddHours(24)
}

If "scheduledTime" exists, Close() will requeue the task "recurEveryNSeconds" from the task's current "scheduledTime". If "scheduledTime" does not exist, Close() will requeue the task "recurEveryNSeconds" from the Close() time. If "recurEveryNSeconds" does not exist, Close() will remove the task from the queue.

We may add some helper methods:
Queue(Task task)

We can have several Task classes:
OneTimeTask
FixedRecurringTask
RollingTask