crontab 文件错误,无法安装
errors in crontab file, can't install
我是 ruby rails 的新人。我通过使用 whenever 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.
它的解决方案是什么?
Unix crontab 有 5 个字段;分钟、小时、星期几、月份、星期几。
这一行:
every '* * * * * *' do
1 2 3 4 5 6 <- Error
您输入的字段过多。
我是 ruby rails 的新人。我通过使用 whenever 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.
它的解决方案是什么?
Unix crontab 有 5 个字段;分钟、小时、星期几、月份、星期几。
这一行:
every '* * * * * *' do
1 2 3 4 5 6 <- Error
您输入的字段过多。