Ruby ruffus scheduler doesn't work on Sunday's

P

Pablo Q.

[Note: parts of this message were removed to make it a legal post.]

Hi,

I have a process that must run on Sunday but by some unknown reason it
doesn't work, here is the code that I'm using:

require 'rubygems'
require 'rufus/scheduler'
require "weekly"

class WeeklyScheduler
def initialize()
@cron_run_weekly = '22 7 * * 7'
end
def start(count)
scheduler =Rufus::Scheduler.new
scheduler.start

#-----------------------------------------------------------------------
job = scheduler.schedule @cron_run_weekly do
day_r = Time.now
puts "Weekly process start for day #{day_r}"
puts "Running weekly!"
process = Weekly.new(date)
process.run
end
scheduler.join
end
end

I tried with this cron's strings too:

@cron_run_weekly = '22 7 * * Sun'
@cron_run_weekly = '22 7 * * 0'

but It didn't run. I'm on an Window Server machine.

Thanks
 
J

John Mettraux

P

Pablo Q.

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,001
Messages
2,570,254
Members
46,849
Latest member
Fira

Latest Threads

Top