R
Railway8mo 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
Percy8mo ago
Project ID: 02416480-305b-470f-8b67-0c09995d30d0
Harris
Harris8mo 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
Brody8mo ago
i think this should do exactly what you want https://railway.app/template/fwH-l3 be sure to read the overview
Harris
Harris8mo 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
Brody8mo 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
Harris8mo 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
Brody8mo 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
Harris8mo ago
No description
Brody
Brody8mo ago
and there you go
Harris
Harris8mo ago
i'm all good then?
Brody
Brody8mo ago
yep
Harris
Harris8mo ago
nice! thank you
Brody
Brody8mo 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
alex8mo ago
this is so cool ❤️