我在轨道上的红宝石新品。我使用随时 gem制作schedule.rb
并编写代码
set :environment, "development"
set :output, {:error => "log/cron_error_log.log", :standard => "log/cron_log.log"}
every '* * * * * *' do
command "echo 'you can use raw cron syntax too'"
end
我已经whenever
,但是当我更新crontab时,它会出现以下错误
"-":3: bad command
errors in crontab file, can't install.
[fail] Couldn't write crontab; try running `whenever' with no options to
ensure your schedule file is valid.
它的解决方案是什么?
答案 0 :(得分:0)
Unix crontab有 5个字段;分钟,小时,月,日,星期几。
这一行:
every '* * * * * *' do
1 2 3 4 5 6 <- Error
您输入了太多字段。