How to check if each stone works?

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?

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?

+4
source share
1 answer

, Part.check_status_update (, puts). schedule.rb, :

set :output, '/path/to/file.log'

, Rails.root/log/whenever.log:

set :output, 'log/whenever.log'

:

runner "Part.check_status_update", :output => 'log/check_status_update.log'

. , , .

+7

All Articles