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
0 answers

Ruby / Rails rake task doesn't end

Till today everything works ok, task was executed, for some time it uses almost 100% of CPU end were removed. But now, tasks doesn't ends and overload server. I use whenever gem and schedule.rb like: every 5.minutes do rake…
Wordica
  • 2,427
  • 3
  • 31
  • 51
1
vote
4 answers

Wrong ruby path used in rake task executed as cron through whenever

I am trying to use the whenever gem to execute a couple of rake tasks. It appears to set up the cron tasks correctly - info here is from the mail output that is produced. Here's an example of the command executed: /bin/bash -l -c 'cd…
ilasno
  • 714
  • 1
  • 13
  • 31
1
vote
1 answer

Deploying with capistrano 3 and whenever gem

I'm trying to deploy my app with whenever gem using capistrano 3. I added: require "whenever/capistrano" to Capfile, and: set :whenever_identifier, ->{ "#{fetch(:application)}_#{fetch(:stage)}" } to config/deploy.rb. When I deploy it I get an…
1
vote
1 answer

Running rake from cron

I have started using the Whenever gem to schedule cron jobs with rails. But sadly rake will not run, I traced the problem to the environment not being loaded. The whenever gem generates scripts like: /bin/bash -l -c '.... I managed to get it to…
Boris
  • 3,163
  • 5
  • 37
  • 46
1
vote
1 answer

Rails-Schedule on tuesday and friday using whenever

I am using whenever for scheduling in my rails app. I could not find how to run my cronjobs on every tuesday and friday of the week anywhere in the gem's documentation. This is what I am doing right now is this correct? every [:tuesday, :friday],…
joker
  • 21
  • 2
1
vote
2 answers

Rails Error: Unable to access log file

I suddenly got this error at my app which ran without problems for more than two years: Rails Error: Unable to access log file. Please ensure that .../production.log exists... WARN -- : Errno::EACCES: Permission denied @ rb_sysopen…
dan_0
  • 599
  • 1
  • 5
  • 17
1
vote
1 answer

AWS Elastic Beanstalk Whenever failed no file or directory /var/app/ondeck

I am trying to add whenever gem to run with ElasticBeanstalk and am getting this error in eb-activity.log which is halting my deployment. Test for Command cron_01_set_leader Activity execution failed, because: [Errno 2] No such file or directory:…
1
vote
1 answer

Problem while writing the cron job using whenever ruby gem

I am trying to setup a cron job using the whenever gem. I have written when the cron job should be run in the schedule.rb and also updated the crontab as mentioned in the railscasts episode. But the cron job does not seem to be running. I am just…
felix
  • 11,304
  • 13
  • 69
  • 95
1
vote
2 answers

Cronatab -e raises this error: /tmp/crontab.JS8BKY: No such file or directory Creation of temporary crontab file failed - aborting

I am using Whenever gem for scheduling jobs. But when my job get executed it raises Jan 3 16:05:01 Ubuntu-1604-xenial-64-minimal CRON[17544]: (CRON) error (create tmpfile) this error.
1
vote
1 answer

Storing periodicity in Rails

I am giving users an option to receive, say, emails at a periodicity of their choice, for example: Every day at 5am or Every Friday at 11pm or even Every second Monday of the month at 12am What would be my best choice for storing this kind of…
The Whiz of Oz
  • 6,763
  • 9
  • 48
  • 85
1
vote
1 answer

Running a cron job at different times for each job

I am building an application in rails that allows users to post products for sale for a set duration of time. Each product has a different 'end_time' in which I want to run a method that sets that updates the product status to 'dead'. I've been…
1
vote
1 answer

Whenever Gem Daily email using actionmailer not sending

I can't seem to make the whenever gem work with my actionmailer. I am trying to run the application in development wherein an email would be sent to a specific individual at a specific time. In my schedule.rb file I have the following: every :day,…
Acrux
  • 386
  • 3
  • 26
1
vote
2 answers

Whenever gem not recognizing instance of class

I have the following class method I call through the Whatever gem. If I call the method from the Rails console it works perfectly. If it is called from the Whatever cron job, the first two logger calls show up in the log file, so I know it is being…
wibberding
  • 815
  • 3
  • 10
  • 17
1
vote
2 answers

Can I use Whenever Gem with a Module Method in Rails

I've created a very small application in rails where I've created a module method in /lib to handle the logic. I've also set up Whenever to run that Module Method at set times. I've followed both the readme from Whenever and these previous posts to…
Cliff
  • 31
  • 4
1
vote
2 answers

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…
Steven Ou
  • 393
  • 2
  • 13