我试图设置whenever
宝石,但我不能。 schedule.rb
档案:
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
启动rails服务器并等待后......没有任何反应。没有logs
更新,请db_backup.sh
更新。没什么......我手动检查/some/path/to/files/db_backup.sh
命令,它有效......