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