Closed Uranium2 closed 2 years ago
I have this problem too, so I use UTC, and it works. Europe/Amsterdam is UTC + 2 hours, so you can use:
schedule.every().day.at("10:42").do(job)
to fix it.
That's not a fix. What happens if I have to migrate my servers into an other region and time zone changes? I'll forget to change the time and all my process will have wrong timings.
I think, that's because newer version of schedule is not loaded to PyPI. When I cloned repo and run schedule.every().day.at("12:42", "Europe/Amsterdam").do(job)
every thing is fine. On the PyPI signature of at()
method is:
def at(self, time_str):
...
but in repo signature is:
def at(self, time_str: str, tz: str = None):
....
Sources from pypi are from "April 10, 2021" for version 1.1.0. But master is way ahead than this tag.
So master is not automatically tagged when there's a PR on Master.
Guess I'll have to specify github repos and commit hash in my requirements.txt
I'm using python 3.8.10 and python 3.7 on Linux (WSL1 for Python3.8.10 and Docker for Python3.7)
I have schedule==1.1.0 in pip3
But when I use the code from the readme with time zone, I get: