R
Railway2y 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
Percy2y ago
Project ID: d781fa1d-7aa1-405f-91b9-977dcd01e020
gvb.
gvb.OP2y ago
d781fa1d-7aa1-405f-91b9-977dcd01e020
Brody
Brody2y ago
this seems more like an XY Question if I'm being honest
gvb.
gvb.OP2y ago
Oh sorry, where do I ask this?
Brody
Brody2y ago
you're in the right place, it just seems like restarting your whole app is a botch job to reset something
gvb.
gvb.OP2y ago
What would you advise?
Brody
Brody2y ago
well first, what does restarting your application at that time achieve?
gvb.
gvb.OP2y ago
it pulls new words from our database otherwise the same words are used.
Brody
Brody2y ago
okay then just pull the new words without restarting
gvb.
gvb.OP2y 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
Brody2y 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.OP2y ago
Hmm Okay!
Brody
Brody2y 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
Want results from more Discord servers?
Add your server