Rails cron with whenever, setting the environment

前端 未结 10 2105
孤街浪徒
孤街浪徒 2021-01-30 13:15

This question will probably only make sense if you know about the whenever gem for creating cron jobs. I have a task in my schedule.rb like

every 1.day, :at =&g         


        
10条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-30 13:53

    Watch out if you want to pass more than one param to whenever.
    You have to do it like that:

    whenever --update-crontab appname --set 'environment=production&cron_log=/path/to/log'
    

提交回复
热议问题