Scheduled job doesn't work the next day (APScheduler)

So I made a python telegram bot, which is hosted on fly and is using other .py files for different functions. The idea is that it will be sending me digests daily at an appointed time. While testing with schedules, which should work right away, everything works, but if the app is left alone for about a day, it misses the schedule and doesn’t send anything. In the monitor, it says this:

Run time of job "digest (trigger: cron[hour='10'], next run at: 2023-09-01 10:00:00 UTC)" was missed by 0:00:01.008295

Does the app go to sleep mode or something? Please, help

Hey @meecosha, a Fly employee should get to this soon!

1 Like

Hi @meecosha

If you don’t have any services configured in the fly.toml, then the Machines aren’t being stopped automatically.

Have a look at your app logs to see why the app is exiting. Are there any errors before the Machine shuts down?

I was following a tutorial and it had these in the fly.toml

app = "appname"
kill_signal = "SIGINT"
kill_timeout = 5
processes = []

Can these mess things up somehow?

Nothing looks incorrect in the fly.toml config.

Check the exit code in your logs. And also check for errors from the scheduler?

1 Like

I added a misfire grace period, let’s see how that works

Okay, for anyone coming here, it worked

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.