R
Railway5mo ago
Joshie

CRON Scheduling

project id: 1b326884-0c17-43ed-9b52-f443662e8f50 Is it fine to enable App Sleeping for a CRON schedule service? I have a service (the psql s3 backup) but it missed the scheduled time. I wonder if I have something not configured properly. Something just feels off. Not to mention, it keeps reseting when it was "sleeping since". Not sure if this is just a UI bug. But it was definitely wrong. If there is a better way to setup / configure this, just lmk
No description
No description
No description
Solution:
then you wouldn't want to enable app sleeping with any kind of cron job / service
Jump to solution
28 Replies
Percy
Percy5mo ago
Project ID: 1b326884-0c17-43ed-9b52-f443662e8f50
Brody
Brody5mo ago
do you have it in single shot mode?
Joshie
JoshieOP5mo ago
yea When I manually run it, it does work properly.
Solution
Brody
Brody5mo ago
then you wouldn't want to enable app sleeping with any kind of cron job / service
Joshie
JoshieOP5mo ago
No description
Joshie
JoshieOP5mo ago
Ok yea. That is what I was wondering. Wasn't sure; but I did suspect that. It does feel strange to me though. ..... wait. Is this just a reporting thing .... it seemed to me that it was still consuming resources. But I guess if it wasn't and it just shows up in the graphs as if it is,,, hmmmmmm So if it is in single shot and has a railway CRON schedule, I don't need to sleep it, becuase the whole service is exited, taking up 0 resources; right?
Brody
Brody5mo ago
that's correct also, even if you where using it's node-cron thing, you still wouldn't want to sleep it, because it's not like it can wake itself up the only thing than can wake a service is inbound public or private traffic
Joshie
JoshieOP5mo ago
Right, this is intuitive. But I would think that a CRON schedule would wake it up. But I guess not.
Brody
Brody5mo ago
nope, there's no traffic with that, ideally that option would be removed from the UI if you have cron enabled
Joshie
JoshieOP5mo ago
Yea, that could make sense. I wonder if there is ever a reason why you would still want to sleep.
Brody
Brody5mo ago
nope, there would not be a good reason to sleep a cron job
Joshie
JoshieOP5mo ago
hmmmmm something feels off here ....
No description
No description
No description
Joshie
JoshieOP5mo ago
No description
Brody
Brody5mo ago
not enough data point to correctly draw a graph
Joshie
JoshieOP5mo ago
Yea, I figure that too. Just more interesting that the different time scales show different data.
Joshie
JoshieOP5mo ago
Should I manually remove the sleeping deployment?
No description
Brody
Brody5mo ago
I blame the module they use for graphs yes
Joshie
JoshieOP5mo ago
oh ummm or not
No description
Brody
Brody5mo ago
haha, switch it back to a regular service for now
Joshie
JoshieOP5mo ago
Turn off single shot?
Brody
Brody5mo ago
no no just remove the cron expression to switch it back to a regular service but side note, glad you're using my single shot mode!
Joshie
JoshieOP5mo ago
I figure it is better to use platform native options. And more than that, I have some ideas for a service I need to make. So I want to test out the railway native options
Brody
Brody5mo ago
oh sorry I mean switch it back to a regular service to fix the sleeping service and then switch it back to a cron service
Joshie
JoshieOP5mo ago
I kinda figured that, that is what you meant
Brody
Brody5mo ago
you're the second person I've seen enabled app sleeping on a cron service
Joshie
JoshieOP5mo ago
It did fix it
Brody
Brody5mo ago
awesome
Brody
Brody5mo ago
please do not close threads
Want results from more Discord servers?
Add your server