Closed vish-c closed 8 months ago
This issue is reported to have been fixed with release v2.2.5 and also by the latest release v2.2.6. Currently i am testing it. I see some other issues with the latest release though mentioned here https://github.com/go-co-op/gocron/issues/694
I do not face this issue any longer after installing v2.2.6, But the issue reported in https://github.com/go-co-op/gocron/issues/694 still exists. I am closing this issue because the original problem reported in this issue seemed to have been solved.
Describe the bug
Dear gocron community, Firstly thank you for a nice package.
i would like to report a probably strange issue where one of the job registered to the scheduler runs the job function but randomly stops executing the function. This again starts executing after explicitly when i trigger scheduler.Start() function via an api call !
I have a custom interface called 'Job' which is implemented by the functions that would eventually be executed by the scheduler.
I have a following global variable called schedulerManager, which i use as singleton variable.
The following functions are for setting up the jobs and then start the jobs
Randomly, the ConsumerJob suddenly stops executing the Run() function. I know this because i have log statements in the even listener functions.
After i observed this behavior, to check if the scheduler has lost the job some how, i have a goroutine which is frequently printing the jobs in the scheduler and the jobs are still known to the scheduler
The ConsumerJob runs every 60 seconds and ProducerJob runs every 10 seconds. The ConsumerJob some times could take more than 1 minute to complete its task ( 2 minutes - 3 minutes ). The output of the above goroutine shows that the Consumer job stops running. The ConsumerJob stops running after 14:00
To Reproduce
Unfortunately i do not have the steps to reproduce this issue because this issue is occurring in random manner.
Version
v2.2.4
Expected behavior
The job should not be ignored by the scheduler
Additional context