a month ago
How do temporarily disable a cron service? If I delete the schedule, the deployment fails. If if change my code, it also changes production? Is there an easy way to pause a cron service?
5 Replies
a month ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
a month ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open brody • about 1 month ago
a month ago
Have you considered making the actual code dependent on an environmental variable?
For example the SHOULD_RUN variable, the code checks it before doing anything. If it's false, exit peacefully. If it's true, continue.
a month ago
I was hoping to not have to modify my code to to make this happen. Is there a configuration I can make to accomplish this?
rossfreedman
I was hoping to not have to modify my code to to make this happen. Is there a configuration I can make to accomplish this?
a month ago
Hey, I would just remove the connected source (for example your GitHub repository) from your service and remove the cron schedule (plus active deployment if there is one) afterwards. This way no new deployments would be created on commit and no cron would run. It will essentially become an empty service with all of your service variables and other settings intact.
Just add the source and cron schedule back once you want to add the service to operate again (CMD/CTRL + K > Deploy latest commit can be used to deploy the latest commit).
Status changed to Solved uxuz • about 1 month ago
