Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cron doesn't run after 15 minutes of running every 2 minutes #231

Closed
Cyberuben opened this issue May 12, 2016 · 4 comments
Closed

Cron doesn't run after 15 minutes of running every 2 minutes #231

Cyberuben opened this issue May 12, 2016 · 4 comments

Comments

@Cyberuben
Copy link

Cyberuben commented May 12, 2016

I just had my application running for 15 minutes. I've had the same problem a few times already, where the cron simply stops executing. I do not have a function calling it to a stop anywhere, no infinite loops or whatsoever, so I don't think this could be the problem. I'm using the following code:

new cron("0 */2 * * * *", functionToExecute, null, true);

The function that is executed has a console.log to let me know it finished executing, this is printed every time, so I know it reaches the end of the function. What could the problem here be?

@frabbit
Copy link

frabbit commented May 18, 2016

same problem for me, after a lot of bugfixing sessions i finally switched to https://github.com/merencia/node-cron and it works very well so far.

@ncb000gt
Copy link
Member

ncb000gt commented Oct 7, 2016

Sorry for the delay here. I've been able to leave test code open over night, testing DST stuff in the past, and everything ran as expected. I'm not entirely sure what would cause this to stop functioning- I can try speculating though.

  • If the "next time" was in the past, it seems unlikely that would be the case, but the stop will be called if this is the case.
  • If you are trying to call setTime that could cause some issues as it will stop the job from running, but I would expect you ruled that out.

I'm not sure if you're still experiencing this issue, but if so, can you start by looking at the next time, timeout, https://github.com/ncb000gt/node-cron/blob/master/lib/cron.js#L445.

Thanks.

@nini-os
Copy link

nini-os commented Oct 18, 2016

In my case the issue is NOT present in node 0.10 but only in node 4.x and later (6.x). If this can help someone.

@ncb000gt
Copy link
Member

ncb000gt commented Aug 4, 2018

Closing due to age. We can create a new ticket if still an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants