I recently made a typo in the whenever (Ruby cron jobs manager) — config:
# config/schedule.rb every 1.day, at: "03:30 am", roles: %i(backupable) do rake %( # %( should be %w( backup:db backup:assets ).join(" ") end
It broke deployment pipeline with the following error:
NoMethodError: undefined method `join' for "backup:db backup:assets":String
To avoid this in the future, we need at least minimal validation of the whenever config. The solution is simple, just run this command on CI:
bundle exec whenever
If there are problems in config, it will return an error. If there are no problems, it will display the resulting crontab.