ajvb / kala

Modern Job Scheduler
MIT License
2.13k stars 188 forks source link

Last commits introduced a bug on recurring jobs #120

Closed MarcoVigna17 closed 8 years ago

MarcoVigna17 commented 8 years ago

I think last commits have introduced a bug on recurring jobs (with no repetitions count fixed).

How to reproduce:

The job is executed at the right time but is not scheduled for the next time, as the log says:

DEBU[0013] timesToRepeat: -1
DEBU[0013] Schedule Time: 2016-05-10 13:48:00 +0100 BST
DEBU[0013] Delay Duration: 10s
INFO[0013] Job Scheduled to run in: 2.291676562s
INFO[0015] Job test_job_stop running
ERRO[0015] Run Command got an Error: exit status 1
ERRO[0015] Error running job: exit status 1

and the job is marked done after the first send.

I also noticed that the if kala is turned off after the scheduling of the job and its supposed execution, then when kala is turned on again, the job is not executed at all.

DEBU[0000] timesToRepeat: -1
DEBU[0000] Schedule Time: 2016-05-10 13:19:00 +0100 BST
DEBU[0000] Delay Duration: 10s
INFO[0000] Starting server on port :8000...

I'm working on fix this problem right now

ajvb commented 8 years ago

@MarcoVigna17 can this be closed?

MarcoVigna17 commented 8 years ago

Yes, I tested it yesterday and it was working in all the cases that I tried. Thanks, @ajvb