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

rails whenever delete records sql

I tried to a records cleanup after certain period of time (6 month) using gem 'whenever'. In my whenever scheduler : every 1.month, at: '1am' do rake 'lib/tasks/cleanup_user.rake' end In the lib/tasks/cleanup_user.rake @user =…
Firdaus Adib
  • 11
  • 1
  • 3
0
votes
1 answer

Undefined method "job_type" for main:Object with Whenever gem at scheduler.rb

I have been trying to implement the Whenever gem to help schedule my Sidekiq tasks. I checked the crontab and it was updated correctly, and bundle exec whenever works correctly in the terminal as well. Here is my schedule.rb: # set RAILS_ROOT …
causztic
  • 78
  • 9
0
votes
1 answer

whenever gem issues using runner

Controller: class CronjobsController < ApplicationController def just_check meeting_id = 1 UserMailer.upcoming_meeting_email_twelve_hours_before(meeting_id).deliver end end Model: class Cronjob <…
Faisal Malik
  • 277
  • 3
  • 6
0
votes
1 answer

Invoking rake with whenever

I just started using Rails Whenever plugin. I have rake file cron. with task: task :cron => :environment do puts "Task invoked!" end And in schedule.rb I have this: every 2.minutes do rake "cron", enviroment => "development" end Once I…
rastko
  • 567
  • 9
  • 24
0
votes
0 answers

Deploy a cron job only app with Capistrano?

I've an application that only being ran as a cron job. I'm using the whenever gem to maintain and deploy my cron jobs. This is a my current deploy script. require "bundler/capistrano" require "whenever/capistrano" set :application, "my-app" set…
Linus Oleander
  • 17,746
  • 15
  • 69
  • 102
0
votes
2 answers

Whenever gem in rails error :'to_specs': Could not find bundler (>= 0) amongst

I am using whenever gem in my application. And i have scheduled a rake task every 5 minutes. But that rake task is not running every 5 minutes. When i saw the log it gave me error like `to_specs': Could not find bundler (>= 0) amongst…
nisha
  • 63
  • 1
  • 1
  • 6
0
votes
1 answer

Whenever not running method okay

I need to make a XML request every minute, and then store the data in a Medida object. Every Meter object has many Medidas (measurements). class Meter < ActiveRecord::Base has_one :user_type has_one :user has_many :medidas attr_accessible…
Sebastialonso
  • 1,437
  • 18
  • 34
0
votes
0 answers

whenever gem command not running on intervals

on the whenever gem I am getting everything right . and can udpate the schedule.rb file but not getting logs after every time interval . Here is the code this is schedule file every 2.minutes do command "echo 'you can use raw cron sytax too'" …
Arpit Vaishnav
  • 4,739
  • 6
  • 39
  • 57
0
votes
2 answers

Whenever rails gem not working with cronjob.. why?

I am using Whenever gem with rails. For some reason the first cronjob does not work. If i copy paste the command into the shell manually, it works as it should. The second "touch testing123.txt" also works fine. I have no idea why the…
Kirk
  • 1,521
  • 14
  • 20
0
votes
1 answer

Rails task in crontab error

Using lubuntu 12.10, ruby 1.9.3p374(not RVM), Gem 1.8.23, and Rails 3.2.11 I've just recently installed the Whenever gem to create tasks that will run periodically. I created my task which runs every 1 minute and set it to run using: whenever…
James
  • 680
  • 2
  • 8
  • 22
0
votes
2 answers

Rails how to create a method that can be used via browser and cron job

I have a method that i created called get_primary_email(user) and it's in my application_controller.rb file. Now i use this method in both my app, as well as a cron job that calls a method which uses get_primary_email(user) My problem is, if i leave…
Catfish
  • 18,876
  • 54
  • 209
  • 353
0
votes
1 answer

Is loading a route via cron, curl and the whenever gem going to cause problems?

I have need to periodically run a background task in my rails app. I've done some research and it seems that there is not a standard way to do this. I don't want to generate a new app context so a runner seems to be out of the question. I'd prefer…
slycrel
  • 4,275
  • 2
  • 30
  • 30
0
votes
1 answer

How to run a command once after a certain time (RoR)?

I want to run a command 48 hours after I set some flag. For example the column gets updated and 48 hours later the command gets executed. I know I can use 'whenever' gem and just schedule the hourly (daily, etc.) checks, but what if I just want to…
Stpn
  • 6,202
  • 7
  • 47
  • 94
0
votes
2 answers

send email every week with whenever

I'm tryong to send a email to all my application 's users. In order to do that, i'm using whenever. So I have a file /config/initializer/setup_mail.rb with my configuration smtp: ActionMailer::Base.smtp_settings = { :tls => true, :address =>…
cecile
  • 293
  • 1
  • 4
  • 17
0
votes
1 answer

How to use whenever gem for cron job?

I am making an application in which user will get a mail after every minute but the problem it is not getting any mail.I have installed the whenever gem and ran the bundle install command.After that i ran wheneverize . command and schedule.rb file…
Mohd Anas
  • 634
  • 1
  • 9
  • 22