Hi, I'm having some trouble figuring out whats going on with a timer that I 
setup with this code:

var cronTasksTimer = setInterval(__.bind(gameServer.runCronTasks, 
gameServer), 1000 * 10);

If I inspect the cronTasksTimer when the cron is working I see something 
like:
{ _idleTimeout: 10000,
  _idlePrev: 
   { _idleNext: [Circular],
     _idlePrev: 
      { _idleTimeout: 10000,
        _idlePrev: [Circular],
        _idleNext: [Circular],
        _idleStart: 1402343890428,
        _onTimeout: [Function],
        _repeat: false },
     msecs: 10000,
     ontimeout: [Function: listOnTimeout] },
  _idleNext: 
   { _idleTimeout: 10000,
     _idlePrev: [Circular],
     _idleNext: 
      { _idleNext: [Circular],
        _idlePrev: [Circular],
        msecs: 10000,
        ontimeout: [Function: listOnTimeout] },
     _idleStart: 1402343890428,
     _onTimeout: [Function],
     _repeat: false },
  _idleStart: 1402343898130,
  _onTimeout: [Function: wrapper],
  _repeat: true }

But sometimes the cron function stops working (the callback doesn't run 
anymore), when this happens I inspect  cronTasksTimer and I see this:

{ _idleTimeout: 10000,
  _idlePrev: null,
  _idleNext: null,
  _idleStart: 1402331871559,
  _onTimeout: [Function: wrapper],
  _repeat: true }

In this state I can execute the cron with:
cronTasksTimer._onTimeout(); // the function works wells.

Any help or clarification on why this could happen would be really 
appreciated.

My process is running node v0.10.24 on Ubuntu with kernel 3.14.4-x86_64.

Thanks!







-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/542eb18a-c270-4924-835a-3ad97383b5eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to