Why are my cron rake tasks called twice?

I have a rails app with every gem installed to install cron jobs that trigger different rake tasks. For reasons unbeknownst to me, every rake task is called twice at the same time. Therefore, my db backup task duplicates db twice at 4:00.

The crontab check shows the correct syntax for all cron jobs, so I don't think this is a problem when gem doesn't configure cron jobs correctly. Also confusing is that both in the intermediate and in the production environment it can invoke tasks on the command line, and they run only once.

Any thoughts on what might cause this? I'm having trouble troubleshooting.

+4
source share
1 answer

The number of cron jobs performed depends on the number of application instances running in the server window. Do you have two instances of a rails application running on the same server?

+1
source

Source: https://habr.com/ru/post/1313233/


All Articles