R
Railway16mo ago
gvb.

automatically restarting my springboot application every 24 hours at 00:00 GMT

Hello, I have a web-based puzzle game that retrieves words from the database, every 24 hours. I made a function in springboot that will restart the run of the application, but when deployed with railway, it does not restart. Could I please get some assistance on how to ensure the springboot application restarts every 24 hours at 00:00 GMT. I am very new to SpringBoot and railway. Thank you in advance.
14 Replies
Percy
Percy16mo ago
Project ID: d781fa1d-7aa1-405f-91b9-977dcd01e020
gvb.
gvb.16mo ago
d781fa1d-7aa1-405f-91b9-977dcd01e020
Brody
Brody16mo ago
this seems more like an XY Question if I'm being honest
gvb.
gvb.16mo ago
Oh sorry, where do I ask this?
Brody
Brody16mo ago
you're in the right place, it just seems like restarting your whole app is a botch job to reset something
gvb.
gvb.16mo ago
What would you advise?
Brody
Brody16mo ago
well first, what does restarting your application at that time achieve?
gvb.
gvb.16mo ago
it pulls new words from our database otherwise the same words are used.
Brody
Brody16mo ago
okay then just pull the new words without restarting
gvb.
gvb.16mo ago
But we need it to specifically pull at 00:00 GMT Hmm wait Is there SQL queries I can pull on that? Also we would need our automated solver to work every time at 00:00 GMT as well
Brody
Brody16mo ago
yeah I'm not familiar with Java but I'm sure there is some in code Cron scheduler that can just call the already existing bit of code that pulls words on app start
gvb.
gvb.16mo ago
Hmm Okay!
Brody
Brody16mo ago
I'm also sure there's a hand full of ways to do this, but an in code cron scheduler is the way I'd do it, don't know if best but maybe simplest