whenever

Rails cron with whenever, setting the environment

This question will probably only make sense if you know about the whenever gem for creating cron jobs. I have a task in my schedule.rb like every 1.day, :at => '4am' do command "cd #{RAILS_ROOT} && rake thinking_sphinx:stop RAILS_ENV=#{RAILS_ENV}" command "cd #{RAILS_ROOT} && rake thinking_sphinx:index RAILS_ENV=#{RAILS_ENV}" com...

How to get the cron working when using Javan-whenever in Rails

I have setup my schedule.rb file as follows. set :cron_log, "/log/cron_log.log" if Rails.env.development? every 1.minute do runner "SomeModel.move_values" runner "SomeOtherModel.dispense" end end I also make it work in development mode by whenever --update-crontab trunk --set environment=development But my model methods...

Whenever Plugin Help

I am trying to use the Whenever plugin for rails to perform a model process at certain times. My schedule.rb is as follows: every 1.day, :at => '5:30 am' do runner "User.mail_out" end My model is as follows: class User < ActiveRecord::Base acts_as_authentic def mail_out weekday = Date.today.strftime('%A').downcase ...

config file in schedule.rb with Rails Whenever gem?

I have a file called config.yml in my /config folder of my rails application. I also have an initializer: config/initializers/load_config.rb with the following code: APP_CONFIG = YAML.load_file("#{RAILS_ROOT}/config/config.yml") I am using the Whenever gem to set up a cron job, and would like to use my APP_CONFIG to call a function li...

Delayed_Job - on site5 server

I am currently using a site5 server and would like rake jobs:work pretty much running all the time. I currently cannot send out the jobs unless i'm logged into the server. I hope that someone out there can help me with this. Had alot of trouble with ar_mailer and the whenever gem ... but have about another 5 gems working perfectly withi...

Missing Required Gems - javan-whenever and cron job in rails

Hi, I have finally managed to get javan-whenever gem working on my site5 server, and updating the crontab is quite easy, however whenever a cron job is run with the code that is generated, i get a "missing required gems" error where it lists about 8/10 of my gems. Has anyone else had this problem? If so, what would the solution be. T...

Is Rails's "delayed_job" for cron task really?

delayed_job is at http://github.com/collectiveidea/delayed_job Can delayed_job have the ability to do cron task? Such as running a script every night at 1am. Or run a script every 1 hour. If not, what are the suitable gems that can do that? And can it be monitored remotely using a browser, and have logging of success and error? ...

Where to put Ruby scripts for script/runner on a Rails project?

I have seen examples where it is put in the lib folder, and another example in the app folder. Is there standard place where it should be put for Rails 2.3.8 and Rails 3 convention? ...

Ruby: How to demonize MailMan (incoming mail processing microframework)

I'm using mailman gem for fetching email from pop3 server and send it to Rails application. What should I do to make mailman be as daemon? Please, tell me easiest way to do it. May be whenever gem can help? Something like: every :reboot do command "cd /home/rails/root && ruby bin/mailman_fetcher.rb" end ...

Why do I always need "ruby" in front of "script/runner"??

When I do just script/runner it gives me -bash: script/runner: Permission denied When I do sudo script/runner it gives me sudo: script/runner: command not found It only works when I do ruby script/runner. Why? Everywhere else I see people just run script/runner without the ruby in front of it... Is there a "fix" for this? It's causing ...

Help with the "Whenever" gem in Ruby for cron tasks

I have not used cron before, so I can't be sure that I did this right. The tasks I want to be automated don't seem to be running. I did these steps in the terminal: sudo gem install whenever change to the application directory wheneverize . (this created the file schedule.rb) I added this code to schedule.rb: every 10.minutes do run...