Cronzitto allows you to schedule tasks to run.
First of all, make sure you have Node.js installed.
$ [sudo] npm install cronzittoRequire cronzitto module
var Cron = require('cronzitto'); var watchMail = Cron.watch( function() {
//Mail.getAll();
}, '10 minutes');The watch method accepts two parameters: the callback and timer.
To cancel a cronzitto event, use the cancel method
watchMail.cancel();Reset the execution time.
watchMail.resetTimer('30 minutes');Wait a while to continue execution
watchMail.sleep('5 minutes');Perform a task only once, after the end of the timer.
Cron.once( function() {
//run after a minute
}, '1 minute');You can receive notifications when the task finishes or is stopped.
Requirements! To use Growl notifications, you need to install node-growl.
To disable the notifications engine, set the Cronzitto:
Cron.config.notify = false;To disable the BEEP sound:
Cron.config.beep = false;Cronzitto is available under the MIT license.
