Doubts in Login - Session

You could create a logged-in users table, log their user id an IP. Also their session ID? When users log in, check to make sure their user ID isn't in the table, then write their connection to the table. When they log out, delete the entry. But what if they just disconnect and don't log out? You'll need to do some sort of housekeeping every so often on sessions/logged connections. I've not tackled this problem yet, but you'd probably have to do it from a cron job. I have several rails tasks that run only from cron and it works very well. Let me know what you come up with

Jason

Narayana Karthick wrote:

We use a class method call to send mass mailings every morning. Cron calls a shell script which does something like

/home/rails/emailapplication/script/runner -e production 'Emailer.send_daily_announcements'

I haven't done this using an ActionController method, but anything you want to run from a script should be able to run from a model. This was just hacked out by a couple of rails noobs, so if anyone has a better way to do it, I'd love to hear about it.

Jason

Narayana Karthick wrote: