R
Railway14mo ago
Harris

cron job to restart service?

is it possible to have my server restart automatically every 24 hours? there's a bit of memory leak that i haven't found yet but i don't want it to impact service
No description
14 Replies
Percy
Percy14mo ago
Project ID: 02416480-305b-470f-8b67-0c09995d30d0
Harris
HarrisOP14mo ago
Railway
404 - Page not found
Railway is an infrastructure platform where you can provision infrastructure, develop with that infrastructure locally, and then deploy to the cloud.
Brody
Brody14mo ago
i think this should do exactly what you want https://railway.app/template/fwH-l3 be sure to read the overview
Harris
HarrisOP14mo ago
is there any way to do it without the bookmarklet? i don't know how to use bookmarks with arc SweatCat it just this?
Brody
Brody14mo ago
that's good question, I should write instructions on how to manually get a schedule string so yes you do use that string and replace the ${} with the stuff it wants the 3 ids can be found from the command pallet ctrl / cmd + k and then search for the id you want and it will copy it to your clipboard you want the restart action, and the expression is a cron expression this expression will restart every 24 hours at 12 am 0 0 * * *
Harris
HarrisOP14mo ago
gotcha i think i have my string will try it out and see how it goes does it log anything in console about getting a valid string?
Brody
Brody14mo ago
I think I've written a pretty robust parser for the schedule string, if you did something wrong it should tell you what was wrong
Harris
HarrisOP14mo ago
No description
Brody
Brody14mo ago
and there you go
Harris
HarrisOP14mo ago
i'm all good then?
Brody
Brody14mo ago
yep
Harris
HarrisOP14mo ago
nice! thank you
Brody
Brody14mo ago
it doesn't run the action at start, on account of it being easy enough for you to restart the deployment in question you'll see logs when it's runs the schedule
alex
alex14mo ago
this is so cool ❤️
Want results from more Discord servers?
Add your server