I have an application with resque and resque-scheduler settings. All tasks run normally and result in logs in the log file. Resque-scheduler alos works fine, loads and processes jobs as expected.
The only problem I ran into is that the scheduler does not seem to write anything to its log file.
I followed the installation instructions here
https://github.com/resque/resque-scheduler#logging
And this code is in my initializer.
Resque.schedule = YAML.load_file(Rails.root.join('config', 'scheduled_jobs.yml'))
Resque::Scheduler.configure do |c|
c.quiet = false
c.verbose = false
c.logfile = File.open("#{Rails.root}/log/resque_scheduler.log", 'w+')
c.logformat = 'text'
end
When the application starts, resque_scheduler.log is created.
When I run the scheduler, it displays the following on stdout (terminal window on my virtual machine). I expected this to go into the log file.
$ rake resque:scheduler TERM_CHILD=1
resque-scheduler: [INFO] 2015-07-17T14:34:27+01:00: Starting
resque-scheduler: [INFO] 2015-07-17T14:34:27+01:00: Loading Schedule
resque-scheduler: [INFO] 2015-07-17T14:34:27+01:00: Scheduling daily_job_email_overdue_items_to_admin
resque-scheduler: [INFO] 2015-07-17T14:34:27+01:00: Scheduling daily_job_to_update_status_to_overdue
resque-scheduler: [INFO] 2015-07-17T14:34:27+01:00: Schedules Loaded
, . , , .
.