Running scheduled tasks with Passenger

15 views
Skip to first unread message

Josh Perfetto

unread,
Jan 5, 2010, 5:00:48 AM1/5/10
to Phusion Passenger Discussions
Hello,

I have a number of Ruby-based tasks which run on a scheduled basis via
cron. Some of these use the full Rails framework + gems, while others
load only portions of it. These tasks are starting to consume
significant memory, so I'm thinking of running them through Passenger
to make use of memory sharing. One approach would be to have a cron
job fire off HTTP requests that result in a controller action being
called that can execute my task, but I wanted to ask if there might be
better ways of doing this.

Also, to achieve maximum memory sharing with Passenger, all gems used
would need to be required in environment.rb, correct?

-Josh

mr_anderson

unread,
Jan 16, 2010, 8:45:28 AM1/16/10
to Phusion Passenger Discussions
cron job with wget requesting the url that invokes the right
controller/action
Reply all
Reply to author
Forward
0 new messages