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
1
vote
2 answers

Cron job not working in Whenever gem in development

I have written this method in my model :- class Message < ActiveRecord::Base def self.create_message ShortMessage.create(message: "cron job") puts "created" end end And then I updated schedule.rb file :- every 1.minute do runner…
code_aks
  • 1,972
  • 1
  • 12
  • 28
1
vote
1 answer

Scheduling tasks by reading time of execution from database instead of code

I am looking for a flow in ruby through which I can run a task daily on some particular times. I want to add a new task in some table, specify the time in some column and the task should be scheduled daily since the row has been added to the table.…
walt3rwhite
  • 73
  • 1
  • 12
1
vote
3 answers

Rails Whenever rake aborted! PG::ConnectionBad: fe_sendauth: no password supplied

I am using the Whenever gem for Rails to run a rake task checking the Postgres database for updates to entries. Running the rake file while SSH into the server works fine but with the cron job it does not run with the error message. rake…
JackFurby
  • 51
  • 5
1
vote
0 answers

Mina-whenever 1.0.1 - Unresolved issue with environment and command not found

I have been struggling for a number of days, trying to deploy an update to my Rails 5.2 application using mina. I am trying to create an automated backup of my production database and am currently doing this using: mina 1.2.3, whenever 0.10.0 and…
Texas
  • 903
  • 1
  • 11
  • 31
1
vote
1 answer

Whenever ruby on rails

In my schedule: every 10.minutes do runner "Model.method" end Whenever created this in my crontabs 0,10,20,30,40,50 * * * * /bin/bash -l -c 'cd /home/projects/Monitoring && script/rails runner -e development '\''Model.method'\''' I tried to run…
Nostrodamus
  • 619
  • 1
  • 6
  • 8
1
vote
1 answer

whenever gem error No such file or directory - crontab

I dont know what problem is this. this my problem This is console output. $ whenever --update-crontab Системе не удается найти указанный путь. C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/whenever-0.10.0/lib/whenever/command_line.rb:77:in…
krax1337
  • 533
  • 1
  • 5
  • 13
1
vote
1 answer

Why is my cron Job not running on OS X (configured by whenever gem)?

I have set up a cron job, using the great whenever gem. every 1.minute do runner "PeerReview.start_feedbacks" end I set up the cron job with: whenever --set environment=development --update-crontab The crontab file looks fine, it shows: * * * *…
Roland Studer
  • 4,315
  • 3
  • 27
  • 43
1
vote
1 answer

Rails whenever not able to execute service methods

I have a NotificationService which has methods like this: def trial teacher notification = Notification.create(recipient: teacher, tag: 'trial', text: 'text', title: 'title') notification.deliver end I want to have a Whenever runner job…
Zlautumn
  • 89
  • 1
  • 11
1
vote
1 answer

Rails whenever not work with rvm

I followed this issue https://github.com/javan/whenever/issues/714 and set my schedule.rb like this. env :PATH, ENV['PATH'] set :output, {:error => '~/Desktop/z.error.log', :standard => '~/Desktop/z.standard.log'} every 1.minute do runner…
rj487
  • 4,476
  • 6
  • 47
  • 88
1
vote
1 answer

Whenever gem how to work on windows system?

Gemfile gem 'whenever', '~> 0.9.4',:require => false config/schedule.rb every 55.minutes do runner "DailyAttendance.fetch_data" end
Santosh Kumbhar
  • 183
  • 3
  • 15
1
vote
1 answer

Cron jobs with whenever not working in production

I'm trying to implement the gem "whenever" so that I can run automatic tasks every day. This is my schedule.rb file: env :PATH, ENV['PATH'] set :output, "log/cron_log.log" every :day, at: '10:10 am' do runner "Task.new.get_drivers" end every…
Wivi0
  • 151
  • 1
  • 1
  • 9
1
vote
1 answer

PG::UndefinedTable: ERROR: relation "services" does not exist LINE 1: SELECT "services".* FROM "services"

I have some trouble using the whenever gem. I create a rake task which is working perfectly fine when I launch it myself BUT when I try to automate it with whenever I got the following message in my log: ActiveRecord::StatementInvalid:…
Doge
  • 93
  • 3
  • 11
1
vote
2 answers

Where do I find my whenever log files?

I'm using the whenever gem for Rails 5. I'm trying to troubleshoot an issue, and after my default schedule.rb file was created at config/schedule.rb, I added some logging directives # Learn more: http://github.com/javan/whenever set :environment,…
Dave
  • 15,639
  • 133
  • 442
  • 830
1
vote
1 answer

whenever cronjob in Rails app in docker container not working

I am setting a cronjob by whenever inside docker container. Everything looks fine but it's not work. Here is part of my code. Gemfile: gem 'whenever', :require => false config/schedule.rb set :output, "log/cron.log" env :PATH, ENV['PATH'] set…
Bater
  • 61
  • 6
1
vote
1 answer

Whenever gem is not sending an email

I want to resend an activation email to users if they do not activate it in 48 hours. I used whenever gem but it is not sending the email. even if action mailer works fine and sends an email when a user signs up schedule.rb set :environment,…
Nejweti
  • 113
  • 2
  • 11