Cronjob Ephemeral Disk Inquiry

2 months ago

Hello I want to ask if you have a cronjob, and that it saves something to ephemeral disk (like a cache), and this cronjob completes

In the subsequent iterations of the cronjob, would the same ephemeral disk be loaded with the stale cache contents or would a fresh new one kick in with nothing in ephemeral?

10 Replies

2 months ago

afaik it doesn’t persist between runs


2 months ago

I will test it out once I’m back on my pc, you made me curious


2 months ago

I am running test scripts on it now and it turns out it DOES persist


2 months ago

(no markdown available for this content)

Attachments


2 months ago

i was being plagued with this stale cache entries until i decided to push an update to figure out why (which redeployed and only when redeployed it destroys the ephemeral disk cache)


2 months ago

===

I think it would be good to have a 2nd confirmation


2 months ago

Yes, it can persist inbetween runs but it's not a guaranteed behavior because our scheduler could re-place your cron job onto another machine at any time.


2 months ago

If you want strong stateful guarantees here then you'd need to attach a volume


2 months ago

i see. In fact i need it to be strong stateless 🤣


2 months ago

i guess it doenst hurt just to remove the file after I am done


Welcome!

Sign in to your Railway account to join the conversation.

Loading...