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
14 Replies
Project ID:
02416480-305b-470f-8b67-0c09995d30d0
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.
i think this should do exactly what you want https://railway.app/template/fwH-l3
be sure to read the overview
is there any way to do it without the bookmarklet?
i don't know how to use bookmarks with arc it just this?
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 * * *
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?
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
and there you go
i'm all good then?
yep
nice! thank you
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
this is so cool ❤️