14 hours ago
Hi Railway team,
We need to migrate a legacy cron service before the December 1 Config-as-Code cutoff.
Our railway.toml defines cronSchedule: "0 8 * * *". The dashboard field is locked, and the stored service value is null.
Can we safely use serviceInstanceUpdate to save the same cron schedule while the TOML is still active, without triggering a deployment or affecting scheduled executions?
Also, does setting cronSchedule: null through the API restore the original value if rollback is needed?
We need to preserve our daily production backups without interruption.
Thanks!
3 Replies
14 hours ago
Yes, mirroring the value with serviceInstanceUpdate is the supported way to move off the file without the CLI. cronSchedule is one of its inputs, so you can set it to 0 8 * * * while railway.toml is still in place. Config in code always takes priority over service settings when a deployment is built, so while the file is active your deployments keep running on the same schedule from the file. After 2026-12-01 we stop reading the file, and the stored service setting is used instead, with no deploy interruption.
New deployments are triggered by the separate deploy mutations (serviceInstanceDeployV2 / serviceInstanceRedeploy).
Setting cronSchedule: null through the API clears the stored setting. It does not bring back a previous value. Because the stored value is null today, setting it to null again puts you back where you are now, and the file continues to apply until the cutoff. For a later rollback, set the schedule string again explicitly.
If you'd rather adopt Infrastructure as Code, follow the migration guide and migrate every service in the environment at the same time instead of one at a time.
Status changed to Awaiting User Response Railway • about 14 hours ago
Railway
Yes, mirroring the value with `serviceInstanceUpdate` is the supported way to move off the file without the CLI. `cronSchedule` is one of its inputs, so you can set it to `0 8 * * *` while `railway.toml` is still in place. Config in code always takes priority over service settings when a deployment is built, so while the file is active your deployments keep running on the same schedule from the file. After 2026-12-01 we stop reading the file, and the stored service setting is used instead, with no deploy interruption. New deployments are triggered by the separate deploy mutations (`serviceInstanceDeployV2` / `serviceInstanceRedeploy`). Setting `cronSchedule: null` through the API clears the stored setting. It does not bring back a previous value. Because the stored value is null today, setting it to null again puts you back where you are now, and the file continues to apply until the cutoff. For a later rollback, set the schedule string again explicitly. If you'd rather adopt Infrastructure as Code, follow the [migration guide](https://docs.railway.com/infrastructure-as-code#migrating-from-config-as-code) and migrate every service in the environment at the same time instead of one at a time.
4 hours ago
Hi Railway team,
Thank you for your previous response. Before migrating our production cron service, we need clarification on two safety-critical points:
1. Does serviceInstanceUpdate with cronSchedule trigger a deployment, restart, or staged change, or does it only save the setting?
2. If cronSchedule: "0 8 * * *" is saved in the service while the active railway.toml specifies the same schedule, will Railway execute the job exactly once per day, without duplicate or immediate executions?
Could a Railway engineer please confirm these two behaviors? We need to protect our production backups.
Thank you!
Status changed to Awaiting Railway Response Railway • about 4 hours ago
4 hours ago
We understand these backups are critical. Our earlier reply covers what this API change does, but we can't give engineering sign-off on how this particular production transition will behave. Since you need to rely on it, please try the same change first on a copy of the cron service in a separate test environment and check the run times there before you apply it to production.
Status changed to Awaiting User Response Railway • about 4 hours ago