Scripting to trigger "Welcome" email to new users

Something like this should work:

User.where('created_at >= ?', 7.days.ago).find_each {|user| user.enqueue_welcome_message('welcome_user')}

It sends the welcome message to all users that where created within the last 7 days.