After building, Payloud Cloud deploys my project twice. This causes my CRON job scripts to run twice. I removed the CRON jobs from the code to show it isn't them causing the double deploy.
Screenshot attached is of the Deploy Logs with the CRON job removed.
Is there something with my build settings causing this? I do not experience this issue locally.
Project ID is
I am on Payload version
I've attached my
Please let me know if you need any other information. I'm at a total loss.
Hey @sassycoder , this is happening because you're on the Pro tier which deploys2 instances
for better redundancy and load balancing. Unfortunately, this means that anything that is not inbound ie. cron, will actually run for both instances.
Currently, we don't have a way to customize the number of instances for a project, but this is something we're exploring right now.
Hope that answers your question, let me know if you have any others.
Hi Elliot! I’m just glad it isn’t me haha. I’ve got an idea for just making it an endpoint and running the CRON job from the front end instead. Thanks for the reply!
No problem, that sounds like a good solution 👍