Socket
Socket
Sign inDemoInstall

hubot-cronjob

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hubot-cronjob

Hubot scriptable cron job


Version published
Weekly downloads
198
increased by55.91%
Maintainers
1
Weekly downloads
 
Created
Source

hubot-cronjob

Hubot scriptable cron job.

It's just like miyagawa/hubot-cron, but controlled via source code instead of user-facing commands. If you wish to allow your users create cron jobs themselves, use that package.

## Usage

An example that fetches restaurant menu every workday at 11am

HubotCron = require 'hubot-cronjob'
fetchRestaurantMenu = require 'my-restaurant-api'

module.exports = (robot) ->
  # monday to friday, 11am
  pattern = '0 11 * * 1-5'
  timezone = 'Europe/Prague'
  fn = fetchRestaurantMenu (err, menu) ->
    if err
      return console.error err
    robot.messageRoom 'lunchroom', menu
  new HubotCron pattern, timezone, fetchRestaurantMenu

How to install

npm install --save hubot-cronjob

Keywords

FAQs

Package last updated on 10 Apr 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