CRON Scheduling
coderjoshdk
TRIALOP

2 years ago

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

32 Replies

2 years ago

do you have it in single shot mode?


coderjoshdk
TRIALOP

2 years ago

yea


coderjoshdk
TRIALOP

2 years ago

When I manually run it, it does work properly.


2 years ago

then you wouldn't want to enable app sleeping with any kind of cron job / service


coderjoshdk
TRIALOP

2 years ago

1253837051925889000


coderjoshdk
TRIALOP

2 years 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?


2 years ago

that's correct


2 years ago

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


2 years ago

the only thing than can wake a service is inbound public or private traffic


coderjoshdk
TRIALOP

2 years ago

Right, this is intuitive. But I would think that a CRON schedule would wake it up. But I guess not.


2 years ago

nope, there's no traffic with that, ideally that option would be removed from the UI if you have cron enabled


coderjoshdk
TRIALOP

2 years ago

Yea, that could make sense. I wonder if there is ever a reason why you would still want to sleep.


2 years ago

nope, there would not be a good reason to sleep a cron job


coderjoshdk
TRIALOP

2 years ago

hmmmmm something feels off here ….

1253839195248525300
1253839195600978200
1253839196066680800


coderjoshdk
TRIALOP

2 years ago

1253839261975711700


2 years ago

not enough data point to correctly draw a graph


coderjoshdk
TRIALOP

2 years ago

Yea, I figure that too. Just more interesting that the different time scales show different data.


coderjoshdk
TRIALOP

2 years ago

Should I manually remove the sleeping deployment?

1253839888940404700


2 years ago

I blame the module they use for graphs


2 years ago

yes


coderjoshdk
TRIALOP

2 years ago

oh ummm or not

1253840081656217600


2 years ago

haha, switch it back to a regular service for now


coderjoshdk
TRIALOP

2 years ago

Turn off single shot?


2 years ago

no no just remove the cron expression to switch it back to a regular service


2 years ago

but side note, glad you're using my single shot mode!


coderjoshdk
TRIALOP

2 years 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


2 years 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


coderjoshdk
TRIALOP

2 years ago

I kinda figured that, that is what you meant


2 years ago

you're the second person I've seen enabled app sleeping on a cron service


coderjoshdk
TRIALOP

2 years ago

It did fix it


2 years ago

awesome


2 years ago

please do not close threads


Loading...