Forum: Ruby on Rails Emailing: How to execute "ar_sendmail" using "RailsCron"

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Tom H. (Guest)
on 2009-01-25 19:06
Hi there,

I'd like to know how to get "ar_sendmail" (a command from the gem
"ar_mailer") executed using the plugin "RailsCron":

FYI: "RailsCron" is a way to execute background tasks using your Ruby on
Rails environment. The RailsCron object is an ActiveRecord, so you can
manipulate it in familiar ways:

RailsCron.create(
  :command => "Object.do_something()",
  :start => 2.minutes.from_now,
  :every => 12.hours,               # default: 1.day
  :finish => 2.years.from_now       # optional
)

I know that "ar_sendmail" is a command that could be executed
a) manually, using the command line (at the root of the rails app), or
b) automatically, using a conventional cron job.

But how do I write the code to have "ar_sendmail" executed from within
my RoR environment (as in the code above)?

Thanks for any solutions & sorry for being a n00b ;-) !
Tom
This topic is locked and can not be replied to.