0
我想設置whenever
寶石,但我不能。 schedule.rb
文件:Rails每當寶石
set :output, "#{path}/log/cron-whenever.log"
every '1 * * * *' do
command "#{path}/sh_files/db_backup.sh"
end
設置:
~# whenever --update-crontab everything
[write] crontab file updated
~# crontab -l
# Begin Whenever generated tasks for: everything
1 * * * * /bin/bash -l -c '/some/path/to/files/db_backup.sh >> /some/path/to/files/cron-whenever.log 2>&1'
# End Whenever generated tasks for: everything
而開始軌服務器和等待之後......沒有任何反應。沒有logs
更新,請做db_backup.sh
更新。沒什麼......我查手動/some/path/to/files/db_backup.sh
命令,它的工作原理...
檢查這裏的日誌'尾-f是schedule.rb,而不是scheduler.rb/var/log/syslog' on linux – Nithin
檢查cron狀態。 '服務的cron status' –
這似乎是一個'cron'問題,請檢查[原因,爲什麼-的crontab不 - 不工作] [1] [1]:http://askubuntu.com/questions/23009/reasons-why-crontab-does-not-work – DevMarwen