R
Railway

✋|help

Redeploy

Llasse8/22/2023
Hey there, is there away to start a redploy using the Railway API
Llasse8/22/2023
n/a
BBrody8/22/2023
yes there is, what's the usecase?
Llasse8/26/2023
So the case is i want to redeploy it every 24 hours, if that is allowed
BBrody8/26/2023
okay but what's the reason you want to do that
Llasse8/27/2023
Better performance for my discord bot.
Ffedev1008/27/2023
Railway has a built in cron service redeployer
Service => settings => chron schedule
0 0 * * *
this should redeploy your service every day at 12AM
Llasse8/27/2023
Thank you!
BBrody8/27/2023
that will not do what they want
it won't restart because something will already be running
Ffedev1008/27/2023
But i tried it and it re deployed my service even if it was already running
BBrody8/27/2023
did the status say complete?
Ffedev1008/27/2023
It was active and then it removed the previous deployment
BBrody8/27/2023
the changelog said they have changed that behaviour to wait for previous deployments to complete
Ffedev1008/27/2023
What do you mean for complete? The is a complete state?
Isn't there removed, failed, active, building and initializing ?
BBrody8/27/2023
you missed deploying and complete
railways cron scheduler will skip a schedule if there is already a deployment in the active state, at least according to their changelog prom the previous week
Ffedev1008/27/2023
I will try it again to be sure then
BBrody8/27/2023
https://railway.app/changelog/2023-08-11-cron-jobs-generally-available
We now skip job execution if a previous cron is still running
assuming that's true, you would not be able to use cron to restart a discord bot because it would be running when the next job starts, thus getting skipped
Fferret8/27/2023
i'm just wondering why you would need to restart it. i run probably 10+ discord bots on railway with no performance issues over time
BBrody8/27/2023
I wasn't gonna open that can of worms
Fferret8/27/2023
fair
BBrody8/27/2023
I was still curious though
Ffedev1008/27/2023
probably worked for me because the first deployent was from github and then it redeployed from the cron?
BBrody8/27/2023
no that wouldn't be the case
if you are right and the cron did stop execution of your previously active state deployment then that is a bug
unless you are confusing active with completed
Ffedev1008/27/2023
don't understand what you mean for completed but it just redeployed for me
I made some screenshots
one sec
BBrody8/27/2023
deployments can have many states, one of which would be "completed" this state is for when your app exits with a non error code, and according to the changelog a cron schedule would be skipped if your deployment is not in this state when the schedule is going to run
Ffedev1008/27/2023
mine was in "active" state not "completed"
Ffedev1008/27/2023
Cron was scheaduled to run at minute 30 of every hour
BBrody8/27/2023
what kind of app is this
Ffedev1008/27/2023
a websocket server
BBrody8/27/2023
interesting
and why do you restart that?
Ffedev1008/27/2023
I dont restart it, i was just testing the cron functionality for @lasse
BBrody8/27/2023
ah gotcha
Llasse8/27/2023
I run into some, its in 500 servers. But dont know with yours
Fferret8/27/2023
ah
BBrody8/27/2023
okay well obviously the best solution would be to fix the performance issues, if that's out of the question, try railways cron, if that doesn't do it, I have another solution that uses the railway api to restart your service in the form of a template
Llasse8/28/2023
It's working
Llasse8/28/2023

Looking for more? Join the community!

Recommended Posts
Kafka Connectioncould anyone help me setup kafka cluster? I've went through the deployment process but getting a conHosting a monorepo with a Vite/Svelte Front and and a Fiber BackendI am trying to host my monorepo application within railway however I am facing some issues when tryiUnexpected timeouts and slow downsHey guys! I'm writing this post since we've been experimenting some slow downs and timeouts during tconfigure variable in VM ARGUMENTSI would like to know how do I create a variable "VM Arguments" in the railway environment? currentluhmm i think i filled the entire disk somehowservice id: 66b587c8-3c50-4dd0-8dfa-394ade04a0eci want to deploy a wordpres, is it possible?project id fb928ae2-62f0-4f8f-be68-9f7902efbebdBilled per usage plan with carryoverHey guys, I'm currently on a usage based plan but my app is only projected to use $1.70/month. Will How to use the Kafka project?I'm relatively new to Kafka and I want to publish and consume events to the Kafka running in a kafkaCannot login to Railway.app this morningHere's what I'm doing to login: I go to railway.app, and select Login enter my email address and preRelative path issueI am trying to read some Json files and parse them with one of my services. Locally it works fine. Can't run Railway CLI down command with project tokenhey , it is possible to run the railway down command with railway project token without logging in. Ruby on Rails Deployment with database and redisi had a few questions about linking my database and redis server within railway app ... I tried but Lost all my 20$ credits out of no whereSo i just got an email saying my projects needs 3$ in credits, but suddenly when i check? my whole 2any reason why my usage suddenly jumps to 4GB when there are no tasks running?The app had no requests for for the entire day but the usage jumped, any reason why this could happei want to dowload my post gre db locallyhow can i dowload my post-gre db locallyCloudflare custom domain not workingI just upgraded the api for Cloudflare, but the custom domain is no longer workingError: Unsupported Gradle version: 8============== Using Nixpacks ============== context: 78ee202a04734b630f61d71bea3f81cd  NixpacksOSError: libheif.so.1: cannot open shared object file: No such file or directoryHello, I have tried everything i can to get my django project deployed, the build completes, but depFlask app not workinghey there am very new to railway, i would love to get some help, I am not familiar with hosting a weAverage Cost of Ghost CMS Blog?Hi so I've recently moved over to Railway.app, after hearing great things about it and getting bogge