I have the following configuration. I installed every time the gem created by shedule.rb was created:
# Learn more: http://github.com/javan/whenever every 6.hours do runner "Part.check_status_update" end
In the part.rb model, I have a corresponding method.
A. How to check if performed whenever? As far as I understand, it should only modify the crontab command after the command wheneverin bash, right?
whenever
B. If the method does not start, how can I debug scheduled tasks? If I put in my instructions puts, where should they be stored or displayed?
puts
, Part.check_status_update (, puts). schedule.rb, :
Part.check_status_update
schedule.rb
set :output, '/path/to/file.log'
, Rails.root/log/whenever.log:
Rails.root/log/whenever.log
set :output, 'log/whenever.log'
:
runner "Part.check_status_update", :output => 'log/check_status_update.log'
. , , .