Dan Munk wrote:
The application I am working on needs a nightly process to comb through
the database and make periodic changes.
What is the best way to implement a script in order to leverage the
existing database connection management and active record
Tell the OS to periodically run a script using 'cron', or the Task Manager, or some derivative therof. Some are called 'at'.
The script may run something like this:
ruby script/runner "load('my_batch.rb')"
my_batch.rb then contains a batch of Ruby, enjoying the complete Rails context. IIRC.
There might be other ways to invoke the runner script. --help didn't confess them.