Browse files

Warn when the max timeout is too large.

The max timeout being too high will cause the timeout to fire
immediately. While this has been fixed, we need to warn people when the
timeout has been changed by the library. This just lets the developer
know of the change.

Signed-off-by: Nick Campbell <nicholas.j.campbell@gmail.com>
  • Loading branch information...
1 parent 7c7506e commit 48844da6e035573b552a20de04548a2e97737112 @ncb000gt committed Jul 4, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/cron.js
View
1 lib/cron.js
@@ -324,6 +324,7 @@ CronJob.prototype = {
if (timeout > MAXDELAY) {
remaining = timeout - MAXDELAY;
+ console.log('WARNING: timeout specified (' + timeout + ') was greater than the max of ' + MAXDELAY + '.');
timeout = MAXDELAY;
}

0 comments on commit 48844da

Please sign in to comment.