Questions tagged [rufus-scheduler]

rufus-scheduler is a job scheduler for Ruby (at, cron, in, every and interval jobs). It's not a substitute for cron, it's just a small in-process scheduler.

Rufus-scheduler is a job scheduler for Ruby (at, cron, in, every and interval jobs).

It's not a substitute for cron, it's just a small in-process scheduler.

The source (and the README) is available at https://github.com/jmettraux/rufus-scheduler

If you need help, make sure to read: help_help.md

189 questions
3
votes
2 answers

Make rufus-scheduler work on Heroku

I would like to use Rufus-Scheduler in order to send a mail daily. I strictly followed the instructions given on GitHub here (the snippet, using Thin server, etc.); but nothnig happened (no mail sent) and I couldn't figured out the reason based on…
Abdel
  • 71
  • 8
3
votes
1 answer

rufus-scheduler not scheduling when running on top of Rails+Unicorn in detached mode

I am using rufus-scheduler to schedule some jobs in my Ruby on Rails application. Relevant specs: Ruby: 2.1.2p95 Rails: 4.1.1 Rufus-Scheduler: 3.0.9 The scheduler runs perfectly fine when I run the application using "rails s unicorn". However when…
Brian Smith
  • 403
  • 4
  • 14
3
votes
1 answer

Rails Custom Rake Task no method error

I am trying to set up a custom rake task for a Rails app that checks to see if your location is within a certain area with street cleaning restrictions. If it is, you can click a button "Remind Me" that will save the user id and restriction id to a…
mnicole
  • 53
  • 6
3
votes
3 answers

Simple task scheduling inside of a Rails app

Is there anyway to setup simple task scheduling inside of a rails app? There are pieces of code that I want to run every hour, or every day or every week. I don't want to break them out into separate scripts that I then have to schedule via cron…
Janak
  • 5,025
  • 8
  • 34
  • 43
3
votes
1 answer

rufus cron job not working in Apache/Passenger

I have a Rails app running on Apache/Passenger. It has a rufus-scheduler cron job that runs in the background and sends out notifications via email. When I am running the app in development on the WEBrick server, the emails are sent like they are…
3
votes
3 answers

Rufus Scheduler: run every x seconds with first run immediately

I'm using the rufus scheduler to have some tasks execute every so often. I'd like the tasks to all run more or less immediately when the script starts and then at the given interval. This doesn't seem to be supported by API, or am I missing…
Joe Taylor
  • 2,145
  • 1
  • 19
  • 35
3
votes
2 answers

Rufus scheduler in Sinatra

I'm using Rufus scheduler in a Sinatra app. Can I access helper methods from within "scheduler do" block? I didn't manage to do it (I get an "undefined method `check' for main:Object" error) so now I have to define the method inside helpers block…
hiirulainen
  • 107
  • 2
  • 8
3
votes
1 answer

How to run schedular at background along with rails app?

I am using Rufus Scheduler to send mail alerts daily at specific time. I have created task_scheduler.rb inside config/initializers.my code is :- scheduler = Rufus::Scheduler.start_new scheduler.cron("0 09 * * *") do …
A B
  • 1,926
  • 1
  • 20
  • 42
2
votes
1 answer

rufus-scheduler fails with rake tasks (Don't know how to build task)

I'm using Rails3 (Windows, Ruby 1.8.7) with rufus-scheduler gem. Gem works fine, but if I'm trying to run some standard rake task, error occurs: Don't know how to build task 'db:version' # ofc, db:version is just example Terminal command rake…
zachar
  • 1,085
  • 1
  • 11
  • 18
2
votes
3 answers

Rufus-scheduler only running once on production

I'm using rufus-scheduler to run a process every day from a rails server. For testing purposes, let's say every 5 minutes. My code looks like this: in config/initializers/task_scheduler.rb scheduler =…
Josiah Greene
  • 23
  • 1
  • 3
2
votes
2 answers

Rufus-scheduler variable for time zone - ruby on rails

I am running a rails app that uses rufus-scheduler to send out a daily e-mail to all users at noon, however, it currently sends it out at noon for the apps timezone "Taipei". I am capturing user timezones on signup, but I am unable to put a…
Steven Thomas
  • 111
  • 1
  • 3
2
votes
2 answers

Rake tasks and rails initializers

Kinda new to Rails, so please cope with me. What i'm doing now is background processing some Ruby code use Resque. To get the Rescque rake task started, I've been using (on heroku), I have a resque.rake file with that recommended code to attach into…
haider
  • 2,418
  • 3
  • 24
  • 26
2
votes
1 answer

Sinatra event triggered by Rufus Scheduler

Trying to send an event from within Rufus Schedulers results in this error: { 70231586340180 rufus-scheduler intercepted an error: 70231586340180 job: 70231586340180 Rufus::Scheduler::IntervalJob "2s" {} 70231586340180 error: …
multiholle
  • 3,050
  • 8
  • 41
  • 60
2
votes
2 answers

Rufus cron scheduling not working on a jetty server

Steps to replicate: Create a new Rails project. (rails 3.2.22.5) Add dependencies (warbler, rake, rufus-scheduler) (/Gemfile) JRuby 9.1.7.0 Create new files. (/config/warble.rb) (/web.xml.erb) (/config/intializers/scheduler_rufus.rb) Create an…
YourAboutMeIsBlank
  • 1,787
  • 3
  • 18
  • 27
2
votes
2 answers

Rails rufus scheduler intercepted an error

I was basically fetching every country time through timezone and was storing in my constant.rb file .But it is throwing an error .I am using tzinfo gem for fetching the time .I don't know how to resolve this error [my_task_scheduler.rb] require…
user5729333
1
2
3
12 13