I have written scheduler using "Whenever Gem", where I have 2 schedulers in my scheduler.rb file.
I want to get the logs from the scheduled tasks, so I have set :output, "log/cron_log.log"
in scheduler.rb. currently all the logs for all the schedulers are logged in my log file, Instead I want the output to be logged for only one scheduler and not for any other scheduler.
How can I do this?
My scheduler.rb
set :output, "log/cron_log.log"
#donot set output log for this.
every 6.hours do
rake "sidekiq:restart"
end
#set output log only for this scheduler
every :day, :at => '01:00am' do
rake 'prune_users:older_than_2months'
end