I don't know if there's a more Rails or Ruby way to do this, but the
best I've done is write a ruby script that bootstraps Rails, get my
work done through ActiveRecord (so I don't by pass any of my business
logic), and then tell cron to run this script every so often.
The following code works for me in bootstrapping Rails:
# Ensure the environment was specified
if ARGV.length != 1
puts "usage: ruby dummy_records.rb <rails_env>"
$LOAD_PATH << File.expand_path(File.dirname(__FILE__))
ENV['RAILS_ENV'] = ARGV.first || ENV['RAILS_ENV']
require File.dirname(__FILE__) + '/../config/boot'
conf = YAML::load(File.open(File.dirname(__FILE__) + '/../config/
# Open ActiveRecord connection
# Enter code here to interact with your models.