how do you handle recurring tasks

http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/2d316fa75d15d03e/2f9ff335c5880f87

I too have the same issue. Can someone comment on using script/runner via a cronjob vs. using the backgroundrb method described above?

Thank you, Jim

class ApplicationController < ActionController::Base

  before_filter :clean

  def clean     ActiveRecord::Base.connection.execute( "       DELETE FROM sessions       WHERE NOW() - updated_at > 3600     " ) if rand( 1000 ) % 10 == 0   end

end