Adds a 'minutes' option to the scheduler

This commit is contained in:
Ilan
2015-08-05 20:30:29 +02:00
parent 77395acbbb
commit de5d0f2725
6 changed files with 61 additions and 4 deletions
+3 -1
View File
@@ -440,7 +440,9 @@ def scheduler(list_key=Conf.Q_LIST):
# set up the next run time
if not s.schedule_type == s.ONCE:
next_run = arrow.get(s.next_run)
if s.schedule_type == s.HOURLY:
if s.schedule_type == s.MINUTES:
next_run = next_run.replace(minutes=+(s.minutes or 1))
elif s.schedule_type == s.HOURLY:
next_run = next_run.replace(hours=+1)
elif s.schedule_type == s.DAILY:
next_run = next_run.replace(days=+1)