1.0.3 • Published 8 years ago

cronshouldrun v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
8 years ago

About

Simple module to evaulate, if a cron expression, should run on the giving time:

Example

var cron = require('cronshouldrun');

console.log(cron.shouldRun(new Date(), '* * * * *')); // will always return true

console.log(cron.shouldRun(new Date(), '20 12 * * *')); // will return true, if the clock is 12:20

console.log(cron.shouldRun(new Date(), '*/2 * * * *')); // will return true, every 2 mintues

console.log(cron.shouldRun(new Date(), '10-20 12 * * *')); // will return true within 12:10 - 12:20

Important

This was designed to be run, in a timer, every minute, because it validates on minute interval, and not secounds

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago