Travis shares a nifty method for cron jobs to grab data from a database at run time.
Blogged here so I'll remember it in a few weeks when I need it.
This might seem awkward but if you've got Ruby on your server it's no more awkward than using PERL. The database thing might be another problem. Except that with sqlite your database is a file and those can be mounted from an NFS drive. Or can you replicate a sqlite file from a central repository?
In the cron file I replace
30 10 2 * * $HOME/bin/foo.sh -sendmailto tjicwith
30 10 2 * * $HOME/bin/foo.shand in the script (Ruby), I replace
puts "output" # write to stdoutwith something like
ActionMailer.send_mail("fromaddr", Person.find(:all, :conditions => "email_bit_foobar = 1").join(","), "subject line", "body")
Blogged here so I'll remember it in a few weeks when I need it.
This might seem awkward but if you've got Ruby on your server it's no more awkward than using PERL. The database thing might be another problem. Except that with sqlite your database is a file and those can be mounted from an NFS drive. Or can you replicate a sqlite file from a central repository?