R
Railwaythis hour
Raz | Ooga

How can I disable a cron job on PR environment?

Project id: 8eeaf105-a438-44c0-9215-78f268bcf4a9.
5 Replies
Percy
Percythis hour
Project ID: 8eeaf105-a438-44c0-9215-78f268bcf4a9
Raz | Ooga
Raz | Oogathis hour
[build] builder = "DOCKERFILE" dockerfilePath = "./cron/router-stats/Dockerfile" watchPatterns = ["cron/", "packages/", "!/*.md", "bun.lockb", "package.json"] [deploy] cronSchedule = "0 * * * *" region = "europe-west4" [environments.pr.deploy] cronSchedule = "null" cronSchedule = "" none works. They both still deploy the service
Brody
Brodythis hour
the service is still going to be deployed, just not as a cron service. you would also need to overwrite the build and start commands to noop type commands so nothing is ever run
Raz | Ooga
Raz | Ooga23h ago
hey Brody! Thanks for your answer could you please give me an example or at least point me to the docs where I can find this? or is there another way of excluding this service from existing on a PR environment?
Brody
Brody23h ago
it looks like you already know how to use environment overwrites, but here are the docs for them - https://docs.railway.app/reference/config-as-code#setting-environment-overrides maybe you could base your pr env off of an env that doesnt have the cron services?
Want results from more Discord servers?
Add your server