i must trigger a celebration sometime later on according to a celebration that's presently happening. I don't expect the amount to become excessive, and so i care much more about simplicity than performance.

For instance:

  • event A happens. i want event B to occur each day later (not time critical)
  • system stores an eye on event in db
  • ongoing process looks with the db, and executes the big event Baloney which are ready, and removes them from db

Performs this seem sensible? I'm using Ruby on rails - I picture this is a reasonably common usecase

Make use of the DelayedJob jewel. Make reference to this screen-cast for additional particulars.

Yes it absolutely is sensible :). You ought to be most likely searching in a Scheduler or perhaps a procedure that runs without anyone's knowledge. Have a look here and here

Essentially, if you finish performing your event A, you'll be putting an entry within the database having a area showing if this should run. While you say, your ongoing process that ought to be scheduled to operate without anyone's knowledge may either be scheduled in steps or perform a polling and query the DB and keep on after that like you've stated.