Open Karmashkin opened 6 years ago
This is true, because that's what the Python crontab module decides:
>>> CronTab("*/45 * * * *").test(datetime(year=2017, month=12, day=5, hour=15, minute=0))
True
>>> CronTab("*/45 * * * *").test(datetime(year=2017, month=12, day=5, hour=15, minute=45))
True
To be honest, I don't think this is a bug. If you want it to run only once an hour, at minute 45, you can specify minute: 45
instead of minute: */45
.
In general, specifying "every X minutes" where X is not an exact divisor of an hour, is just confusing.
If you expect that */45
runs at e.g. 15h00, 15h45, 16h30, 17h15, etc., then no, this is too hard to code, and makes yacron not handle restarts well: it would have to store the state of when it last ran a job elsewhere. I honestly don't want to down that road.
I think this is something yacron can try to catch as configuration error, though.
it can become your killer features :) read Google, I agree it's not a bug
yacron run inside docker alpine 3.6 based python 3.6.1 timezone in the container and on the host is the same.
The report 'onSuccess' comes two times, 45 minutes and 15 minutes after that. in other words, the task runs twice per hour
crontab.yaml