dbader / schedule

Python job scheduling for humans.
https://schedule.readthedocs.io/
MIT License
11.73k stars 959 forks source link

1 minute scheduling. Seems to crash after 45 minutes #505

Open CAReeser opened 2 years ago

CAReeser commented 2 years ago

Is it OK to use this format? schedule.every().minute.do(updateObservingConditionsCSV)

rather than: schedule.every(1).minutes.do(updateObservingConditionsCSV)

If not ok, might want to update the docs. I have the thread crashing after 45 minutes and I am trying to localize the issue.

`

CAReeser commented 2 years ago

BTW, this is a great program. Simple to implement and very useful.

gitagogaming commented 2 years ago

Interesting, I have been having a similar issue that I've seemed to narrow down to this as well, although mine is set to every 5 minutes

faulander commented 2 years ago

I do schedule.every().minute.do(updateObservingConditionsCSV) since i started using schedule, so yes - this works.

SijmenHuizenga commented 2 years ago

Were you able to find the problem? If not, is there an error when the crash happens?

For future reference, schedule.every() is exactly the same as schedule.every(1). The default param is 1:

https://github.com/dbader/schedule/blob/ed7d21961242f86342da240ee1d089c1cee37de6/schedule/__init__.py#L161

jcphlux commented 2 years ago

I was having similar issues and it ended up being a memory leak issue. I was able to correct it by ether forcing garbage collection or by call del to remove variables from memory.