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

Connection refuse when sending mail with cron tab

I'm doing a daily sending email task by using whenever gem. I created a rake task in RAKEFILE name coffee. Here is my task's code: task :coffee => :environment do ReservationBooksNotify.notify.deliver puts "hihi" end When I run this task in…
duykhoa
  • 2,227
  • 1
  • 25
  • 43
0
votes
2 answers

Is it possible to use the 'whenever' ruby gem while not having permission to use crontab?

I'm about to write a script which execute some ruby scripts in a scheduled manner. Production env: Enterprise's cluster running debian with restricted permissions for users so I don't have permissions to edit cron table files. can I use whenever…
Ayoub
  • 73
  • 2
  • 7
0
votes
1 answer

Why can't the "whenever" gem find the "bash" command?

I am using the "whenever" Ruby gem and RVM to control my rubies/gemsets. When I try using whenever, I see the following error. /bin/bash: not found
dansch
  • 6,059
  • 4
  • 43
  • 59
0
votes
1 answer

rake: uninitialized constant in rake task

I have some custom classes/modules defined under /app/lib. I have a Rake task, via whenever, that tries to load the environment then execute one of the class methods. Here's an example of the rake task: namespace :box do task :fetch =>…
user1309480
  • 75
  • 3
  • 7
0
votes
0 answers

Removing cron jobs added by whenever gem when i move my application to a different server?

Suppose I have my rails application running on server A. I have also started some cron jobs added using the whenever gem. Now if I want to shift my application to server B, is there a way to automatically stop (or remove) the cron jobs running on…
Saicharan S M
  • 828
  • 3
  • 11
  • 25
0
votes
1 answer

Rails 3 + Whenever Gem + Rake logging issue

The app is running on Engine Yard. I need to log some data from inside the scripts ran by Whenever. Here's what it looks like: schedule.rb: every 1.minute do rake 'my_tasks:task1 my_tasks:task2', :output => 'log/my_tasks.log' end task1 runs the…
Vincent
  • 16,086
  • 18
  • 67
  • 73
0
votes
1 answer

whenever + delayed_job with cron job in starting worker

I am learning cron job and delayed job, and I want to send emails using background job; for that I'm using the delayed_job gem. I don't want to start the worker manually by running the rake jobs:work command, but I want to set this rake in cron job…
urjit on rails
  • 1,763
  • 4
  • 19
  • 36
0
votes
2 answers

Is it possible to run a cron job randomly between 3-6 minutes?

I defined a cronjob with the whenever gem for Ruby. This created a cron job for the user that runs a ruby script every 5 minutes. The user is not root and doesn't have root permissions. I would like to be able to run this job randomly between 3-6…
devcoder
  • 1,675
  • 2
  • 21
  • 28
0
votes
1 answer

whenever cron is not working with rails-3

I'm using Whenever for the first time. My cron is not working on the production server. I m using rails-3.1.2 In my schedule.rb file every :hour do # Many shortcuts available: :hour, :day, :month, :year, :reboot runner "Report.create_report",…
manish nautiyal
  • 2,556
  • 3
  • 27
  • 34
-1
votes
1 answer

How do I change the images in a rails app every 24 hours?

I have an Rails app with a gallery of 6 images. I would like to automatically switch which images are displayed every 24 hours. I have the logic for selecting the images in a rake task, which returns an instance variable of @todays_paper: namespace…
-1
votes
1 answer

Ideas needed for tools and scripts to use with simple automated Rails app

I've created a Rails 6 app that downloads data from an SFTP server. I have the Ruby script working and now need to automate the following: Logon to the server --> Download the data --> Send the data files to a folder within the app or perhaps a…
Demian Sims
  • 871
  • 1
  • 14
  • 29
-1
votes
1 answer

Ruby on Rails how to get started with whenever cron in Windows 10

I need to create a cronjob in windows using ruby on rails. I am using 'whenever' gem for that but not getting proper idea about that. Please let me know if there any alternative way for that. Thanks in advance.
Pinki
  • 71
  • 1
  • 10
-1
votes
1 answer

Whenever cronjobs doesn't run on staging - but works on production

I am facing a very weird scenario. I am using whenever to run cron jobs in the following way every 1.day, at: '12:30 am' do runner 'CronJobs.some_method' end The error is logged to cron_error.log. Everytime I get this weird error in the log…
Manoj M J
  • 409
  • 4
  • 16
-1
votes
1 answer

Cron job using Whenever gem not running properly

I wrote a cron job using whenever gem. This is my schedule.rb env :PATH, ENV['PATH'] env :GEM_PATH, ENV['GEM_PATH'] set :output, "log/cron_log.log" every 2.minutes do runner "Action.cron_actions_ranking" , :environment => 'development' end So…
mhaseeb
  • 1,739
  • 2
  • 12
  • 24
-1
votes
1 answer

how can i trigger a rake task on every 4th sunday of every month in rails?

i am having a rake task. i want that task to be scheduled to run on every 4th Sunday of every month. i am using whenever gem. how can i define logic in config/schedule.rb so that it will run on every 4th Sunday of every month in Rails? please help…
John
  • 1,273
  • 3
  • 27
  • 61
1 2 3
33
34