AR Session Tidying

I know there's a one-liner that will remove ActiveRecord sessions older than a certain date. I'd like to run a daily cron job to keep the collection relatively low. Can someone please remind me?

Thanks

I came up with a slightly different solution: I wrote a simple plugin. The idea is that I need to do this in most of my Rails apps, so having a crontab entry:

@daily /wherever/my/current/script/runner "Session.cleanup"

The cleanup method takes an optional argument of as-of, so I can do:

script/runner "Session.cleanup(10.minutes.ago)"

Is the plugin worth posting?

Steve

Al Evans-2 wrote: