2 months ago
I've created a PostgreSQL backup component Postgres Daily Backups that includes a reasonable default cron schedule in the
railway.json
file:
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "DOCKERFILE",
"dockerfilePath": "Dockerfile"
},
"deploy": {
"numReplicas": 1,
"cronSchedule": "0 3 * * *",
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 3
}
}
Issue:
When users deploy this service via the template, the cron schedule field appears to be locked/non-modifiable in the template deployment configuration page. This prevents users from customizing the backup
schedule during initial deployment.
Expected Behavior:
I'd like to provide users with a sensible default cron setting (daily at 3 AM UTC) while also giving them the ability to override this value during template deployment, similar to how environment
variables can be modified.
Current Workaround:
Remove the cron setting from the railway.json and add a setting that the user needs to configure to use my template successfully.
Use Case:
For a backup service, different users have different requirements:
- Some want daily backups at 3 AM (the default)
- Others need hourly backups for critical data
- Some prefer weekly backups for less critical systems
Being able to modify the cron schedule during deployment would improve the user experience.
Suggestion:
Could the template deployment UI include an editable field for cronSchedule when it's specified in railway.json, similar to how environment variables are handled?
2 Replies
2 months 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!
2 months ago
Hello,
Modifying the CRON schedule via the UI being disabled when the option is set via Config as Code is the desired behavior and won't be changed.
But if you would like a CRON schedule option in the template composer, please open a feedback thread for that.
Best,
Brody
Status changed to Awaiting User Response Railway • 2 months ago
2 months ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • about 2 months ago