Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

clockwerk

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clockwerk

Node js job scheduler (Cron)

  • 0.2.4
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

clockwerk Build Status

Simple nodejs cron job scheduler.

Usage (ES6)

import { Cron } from 'clockwerk'

let cronJob = new Cron(
  'Cron Job Name',      // Name:    string
  '*/5 * * * * *',      // Date:    Crontab instructions or Date object
  () => {               // Action:  Function

    // Job to execute

  },
  () => {               // OnComplete: Function(Optional)

    // Action to run on job completed/stopped.

  });
cronJob.runScheduling();

Usage (ES5)

var Cron = require('clockwerk').Cron;

var cronJob = new Cron(
  'Cron Job Name',
  '*/5 * * * * *',
  function () {

    // Job to execute

  },
  function () {

    // Action to run on job completed/stopped.

  });
cronJob.runScheduling();

Crontab Instruction

  *    *    *    *    *    *
  ┬    ┬    ┬    ┬    ┬    ┬
  │    │    │    │    │    |
  │    │    │    │    │    └ day of week (0 - 7) (0 or 7 is Sun)
  │    │    │    │    └───── month (1 - 12)
  │    │    │    └────────── day of month (1 - 31)
  │    │    └─────────────── hour (0 - 23)
  │    └──────────────────── minute (0 - 59)
  └───────────────────────── second (0 - 59, OPTIONAL)

License

MIT

Keywords

FAQs

Package last updated on 12 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc