whenever gem have cronjob on only one machine?

后端 未结 2 2034
旧时难觅i
旧时难觅i 2021-02-04 09:25

We have a large deployment of around a dozen servers. We\'d like to use the Whenever gem but I can\'t figure out a way to say which machine the cron jobs should go on! We only w

2条回答
  •  野性不改
    2021-02-04 09:54

    whenever is preconfigured to run against the db role, so if your db role is also the background machine's role you don't have to do the 'role :whenever, "192.168.0.1"' hack. see the codes

    https://github.com/javan/whenever/blob/master/lib/whenever/capistrano.rb#L2

提交回复
热议问题