[Backgroundrb-devel] Scheduling one-off tasks
joost at spacebabies.nl
Mon Jul 21 16:53:03 EDT 2008
I am building a Rails website which has content that expires at some
time in the future.
Since this content is cached, by the time it expires I would like a
method to sweep the cache at that time. Since it's based on a date, I
cannot use the Rails app itself. I could use polling or sweep the
cache every 5 minutes, but maybe there's a better approach?
I would like to know if I can use backgroundrb's at/cron-like features
to schedule one-off execution of a piece of code at a date/time in the
future. This would be a sweeper that runs at the expires_at time of my
I realise I can build a worker that goes into a sleep/wait loop until
the desired time, but that's not really better than polling.
Could backgroundrb be helpful?
More information about the Backgroundrb-devel