summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Grönholm <alex.gronholm@nextday.fi>2018-01-05 12:38:02 +0200
committerAlex Grönholm <alex.gronholm@nextday.fi>2018-01-16 00:39:40 +0200
commitaa6a30a219e4b9ef217eba59b0bb5098981efc66 (patch)
tree70c93e24b1c57bf6ef69995b308ae23550c89135
parent295d82781fc88bd65a14f8fb0a47ab168b8bcdaa (diff)
downloadapscheduler-aa6a30a219e4b9ef217eba59b0bb5098981efc66.tar.gz
Compare next_date to start_date, not previous_fire_timev3.5.1
-rw-r--r--apscheduler/triggers/cron/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/apscheduler/triggers/cron/__init__.py b/apscheduler/triggers/cron/__init__.py
index c3e40fc..6bcfb27 100644
--- a/apscheduler/triggers/cron/__init__.py
+++ b/apscheduler/triggers/cron/__init__.py
@@ -187,11 +187,11 @@ class CronTrigger(BaseTrigger):
# Skip this field value
next_date, fieldnum = self._increment_field_value(next_date, fieldnum)
except AmbiguousTimeError:
- # Try this datetime with DST set unless it's earlier than
- # previous_run_time, in which case don't set DST
+ # Try this datetime with DST set unless it's earlier than start_date,
+ # in which case don't set DST
next_date = self._set_field_value(next_date, fieldnum, next_value,
is_dst=True)
- if previous_fire_time and next_date <= previous_fire_time:
+ if next_date < start_date:
next_date = self._set_field_value(next_date, fieldnum, next_value,
is_dst=False)
fieldnum += 1