Reputation:
Me new in ruby on rails. I make schedule.rb
by using the whenever gem, and write a code
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
I already did whenever
, but when I update crontab it gives following error
"-":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.
What is its solution?
Upvotes: 2
Views: 9930
Reputation: 34328
The Unix crontab has 5 fields; minute, hour, day of month, month, day of week.
This line:
every '* * * * * *' do
1 2 3 4 5 6 <- Error
You entered too many fields.
Upvotes: 4