Rails 3 и crontab — журнал Crontab пуст

Я реализовал драгоценный камень всякий раз в своем приложении ruby ​​on rails. Этот драгоценный камень сгенерировал файл конфигурации, и у меня есть такие данные:

config/schedule.rb

set :output, "/vol/www/apps/logs/cron_log.log"                                #Log for production.
set :my_path, "/vol/www/apps/ror_tutorial/current"

every 5.minutes do
  command "cd #{my_path} && bundle exec rake thinking_sphinx:index RAILS_ENV=production && bundle exec rake thinking_sphinx:rebuild RAILS_ENV=production && chmod 777 -R #{my_path}/log"
end

Итак, это генерирует такой код в crontab:

$ crontab -e

# Begin Whenever generated tasks for: ror_tutorial
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /bin/bash -l -c 'cd /vol/www/apps/ror_tutorial/current && bundle exec rake thinking_sphinx:index RAILS_ENV=production && bundle exec rake thinking_sphinx:rebuild RAILS_ENV=production && chmod 777 -R /vol/www/apps/ror_tutorial/current/log >> /vol/www/apps/logs/cron_log.log 2>&1'

# End Whenever generated tasks for: ror_tutorial

Все работает, но мой cron_log.log пуст. Почему? Как я могу это исправить?


person ExiRe    schedule 23.02.2012    source источник


Ответы (1)


Проверьте, где запускается crond. Уровень ведения журнала может быть отключен. Этот пост объясняет это достаточно хорошо.

person ScottJShea    schedule 23.02.2012