1.2.0 • Published 10 years ago

cronzitto v1.2.0

Weekly downloads
4
License
MIT
Repository
github
Last release
10 years ago

Cronzitto

Cronzitto allows you to schedule tasks to run

NPM

Install

First of all, make sure you have Node.js installed.

  $ [sudo] npm install cronzitto

Usage

var Cron = require('cronzitto');

Run a task every time interval

  var watchMail = Cron.watch( function() {
    //Mail.getAll();
  }, '10 minutes');

The watch method accepts two parameters: the callback and timer.

Cancel event

To cancel a cronzitto event, use the stop method

  watchMail.cancel();

Reset Time

  watchMail.resetTimer('30 minutes');

Sleep

Waiting time to continue execution

watchMail.sleep('5 minutes');

Only once

Perform a task only once after the end of the timer.

Cron.once( function() {
  //run after a second
}, '1 minute');

Notify

You can receive notifications when the task finishes or is stopped.

Requirements! To use Growl notifications, you need to install node-growl.

Non-Notify

To disable the notifications engine, set the Cronzitto:

  Cron.config.notify = false;

Non-Beep

To disable the BEEP sound:

  Cron.config.beep = false;

License

Cronzitto is available under the MIT license.

1.2.0

10 years ago

1.1.0

11 years ago

1.0.1

11 years ago

1.0.0

11 years ago

0.1.2

11 years ago

0.1.0

11 years ago