Questions tagged [whenever]

a Ruby gem that makes it possible to define cron tasks in Ruby

whenever is a Ruby gem that makes it possible to write and maintain cron tasks in Ruby, using a simplified and expressive syntax.

Resources

Related Tags

500 questions
0
votes
1 answer

Getting through Capistrano configuration with Whenever gem

I've set up a very simple method in my whenever gem's schedule.rb file every 10.minutes do rake "update_models" end All I'm trying to accomplish now is configure Capistrano to automatically create the crontab by calling whenever…
aaron-coding
  • 2,571
  • 1
  • 23
  • 31
0
votes
1 answer

Rails - How to save datetimes correctly in MongoID and trigger them with whenerver (cronjobs)?

I try to save datetimes into events in MongoDB with Mongoid. The difficulty is that I want to save them for different timezones (e.g. Berlin and London). I want the user (admin) to see the actual time in the timezone so that he does not need to…
Luis
  • 33
  • 6
0
votes
1 answer

Undefined method 'zero?' for nil:NilClass (NoMethodError)

I added the whenever Gem to my project. I added this code to my deploy.rb as instructed. set :whenever_command, "bundle exec whenever" require "bundler/capistrano" require "whenever/capistrano" I got the following error when I tried to run cap…
Eric Coulthard
  • 500
  • 6
  • 20
0
votes
2 answers

How can I launch a application with Ruby?

I want to write a simple script that will check to see if a program is open every hour using the whenever gem. If that application is not open I want it to start up the application. I can't find out how to launch an application with Ruby. Pardon the…
Scott
  • 471
  • 3
  • 9
  • 19
0
votes
1 answer

How to make feed_entries downloaded every 3 minutes in mongoid

I have two models source.rb and feed_entries.rb. How to make feed_entries downloaded every 3 minutes. I've tried through gem 'whenever' and received an error NoMethodError: private method `select' source.rb class Source include Mongoid::Document …
Anton Ipatov
  • 169
  • 2
  • 14
0
votes
1 answer

crontask generate by Whenever doesn't run

I have this cronfile : # Begin Whenever generated tasks for: mtaville_staging * * * * * cd /home/mtaville/mtaville_staging/releases/20141202140931 && RAILS_ENV=staging bundle exec rake cinemas:import --silent # End Whenever generated tasks for:…
p0k3
  • 333
  • 5
  • 23
0
votes
1 answer

Command cron_01_set_leader output: bash: /usr/local/bin/bundle: No such file or directory

After installing/configuring whenever-elasticbeanstalk gem, I'm seeing the following error in /var/log/cfn-init.log on my EC2 instance after running git aws.push from my local repo. Iam using aws elastic benastalk with rails 4. 2014-10-21…
Sumit Rai
  • 637
  • 1
  • 6
  • 11
0
votes
1 answer

Struggling with the deployment of whenever cron jobs

I have a Rails 4 application deployed with Capistrano 3. Lately I tried adding some cron jobs using Whenever Gem. The problem is basically when I deploy- none of the schedule.rb jobs aren't exists. Also, I don't see any of the log files…
cyber101
  • 899
  • 1
  • 9
  • 19
0
votes
0 answers

Whenever gem NoMethodError

I am trying to make a functionality that sends emails at a specific time every day. I am using the whenever gem with rails 4 but I can't get it work. **schedule.rb** every 4.days do runner "User.reporting" end **User.rb** def…
gematzab
  • 181
  • 1
  • 3
  • 14
0
votes
1 answer

ruby, sinatra whenever json.parse and input Datamapper

I want use whenever and every 5 min (ex)0,5,10,15,20 ... 55) json parse site and input my database.. and instantly processing script... config/schedule.rb every '0,5,10,15,20,25,30,35,40,45,50,55 * * * *' do rake "do_something" end Rakefile task…
0
votes
1 answer

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

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…
Matenia Rossides
  • 1,406
  • 9
  • 35
0
votes
1 answer

`report_activate_error': Could not find RubyGem bundler (>= 0) (Gem::LoadError)

I am trying to execute rake task using crontab and getting following error: /usr/lib/ruby/site_ruby/1.8/rubygems.rb:779:in `report_activate_error': Could not find RubyGem bundler (>= 0) (Gem::LoadError) from…
Ritesh katare
  • 132
  • 3
  • 11
0
votes
1 answer

Ruby on Rails, Capistrano, Whenever: Cron jobs not getting executed at production server

Ruby on rails + Capistrano + Whenever gem I executed whenever --update-crontab but still cron job is not getting executed at production server. There are no logs in the log file. Though everything works well at development where capistrano is not…
red-devil
  • 1,064
  • 1
  • 20
  • 34
0
votes
0 answers

How to trigger a cron job after a controller action in ruby on rails.

I want to create a cron job to send mail every week after the user creation. User controller def create @user = User.new(user_params) if @user.save redirect_to(@book, :notice => 'User created') else render 'new' end …
Kavitha Velayutham
  • 663
  • 1
  • 9
  • 27
0
votes
1 answer

Whenever gem not working rails 4

I had followed the Whenever tutorials and installed the gem. I'm using Ubuntu. I have written this method in the model: def self.cron_job puts "am in cron" InspectionReport.all logger.info Time.now.to_s InspectionReport.all.each do |ins| …
Sharath Kirani
  • 105
  • 1
  • 7