R
Railway2mo ago
Ezg0t

Cron jobs

I have a main app in Django and a separate service that downloads events from the main app and syncs them with Google Calendar. I want this synchronization to happen every 5 minutes. I'm considering whether to use cron jobs or to run the service continuously with some kind of scheduler (e.g., Celery or APScheduler) - I guess the cron jobs will use less resources? I'm testing cron jobs right now, and it starts main.py, which currently just prints 'main.py'. Does the log 'container event container died' mean that the container closed after running the whole code? But why first log is 'contrainer event container died' then my print?
No description
3 Replies
Percy
Percy2mo ago
Project ID: N/A
Ezg0t
Ezg0tOP2mo ago
N/A
BillyDotWS
BillyDotWS2mo ago
if you run your code locally, is it persisting or instantly dying when you run it? this looks like expected behavior (minus the log order). Your container does exactly what the code you provided intends it to do.
Want results from more Discord servers?
Add your server