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

how can I run ruby script for n-occurrences every X-minutes

I am looking at https://github.com/jmettraux/rufus-scheduler which nicely allows me to schedule and chain events. But I want the events to stop after, say, the 10th occurrence or after the 24 days. How do I do this? My case would be: run a script…
Satchel
  • 16,414
  • 23
  • 106
  • 192
-1
votes
1 answer

rufus gem how to keep one job running while stopping the other

This is my scheduler.rb in my initializer file unless defined?(Rails::Console) || File.split($0).last == 'rake' s = Rufus::Scheduler.singleton s.every '1m', :tag => 'main_process' do Rails.logger.info "hello, it's #{Time.now}" …
-1
votes
1 answer

Will Rails Rufus scheduler job skips if its overlap variable false and mutex variable exists?

scheduler.every '1m', :overlap => false, :mutex => "my_lock" do something... end will this scheduler's job wait for the previous run to finish or skips if it finds that previous run is still running?
-1
votes
1 answer

How to reschedule in rufus-scheduler?

I'm writing a Telegram-Bot's server in Ruby, and I want to repeat running some code. But the problem is the code I want to repeatedly run is dynamic, how can I reschedule it?
蘇健豪
  • 541
  • 4
  • 13
-1
votes
1 answer

rufus-scheduler -> not a valid cronline on Windows

I have simple rufus code that works on GNU/Linux but not on Windows. I am using the same version of rufus. Just updated Ruby on Windows to ruby 2.2.3p173 (2015-08-18 revision 51636) [i386-mingw32] but it did not help. Question: Any idea if .cron…
Radek
  • 13,813
  • 52
  • 161
  • 255
-1
votes
1 answer

Config Resche schedule to delay sending mail in specific time

SO sorry if this is a duplicate, I tried searching for this but wasnt sure what search terms to use and didnt really find anything I'm currently research on how to set up a schedule of job-to-do when a server start on my application. The function I…
-2
votes
2 answers

Rufus::Scheduler join can not exit at last in ruby

i use Rufus::Scheduler to schedule a task, the code is listed below: class Scheduler def self.run scheduler = Rufus::Scheduler.start_new job = scheduler.in '5s', A.new scheduler.join end class A def call(job) puts…
ywenbo
  • 3,051
  • 6
  • 31
  • 46
-2
votes
1 answer

Can I allow users to schedule tasks with rufus-scheduler?

I have an app that scrapes data from a webpage. This scraping takes about 5-10 minutes and so it is not a very user-friendly experience. I would like for a user to be able to set up and schedule a time for the page to be scraped and then once…
Kwestion
  • 464
  • 5
  • 19
-2
votes
1 answer

Ruby rufus scheduler

I have this very simple code to run rufus/scheduler: require 'rufus/scheduler' require 'rubygems' scheduler = Rufus::Scheduler.new scheduler.every '1s' do puts "Hello world" end scheduler.join This doesn't seem to work and I get no result.
Rohan Dalvi
  • 1,215
  • 1
  • 16
  • 38
1 2 3
12
13