npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

momo

v0.0.130

Published

Cronjob with web hooks.

Downloads

14

Readme

Momo

Cronjob to web hooks.

Build Status

About

Momo was designed to work as a worker (continuous process), and call it hooks when cron job should be executed. Also Momo DOES NOT USE A DATABASE, it uses remote CSV file to fetch it hook cron list.

Requirements

##Configuration

All Configuration can be done through server.js file in root directory. (This file is just a sample of a simple server)

Initialization config

  • option.cronURL - End point to fetch cronjob list. REQUIRED
  • options.cronFetchLoop - Time interval to Momo fetch options.cronURL in seconds - Default value is:3600000 milliseconds. OPTIONAL
  • options.momoFPS - Momo Check Loop (aka.FPS) in milliseconds - Default value is:60000 milliseconds. OPTIONAL

Installation

Start server

$ 'node server.js' OR 'foreman start'

##CronJob Syntax

Momo CronJob syntax is very near to the Unix cron syntax, BUT it'll not allow ? character ,words and special keywords. (the last 2, are on roadmap.)


###Style * * * * * url_to_be_called ┬ ┬ ┬ ┬ ┬ │ │ │ │ │ │ │ │ │ │ │ │ │ │ └───── day of week (0 - 6) (0 is Sunday) │ │ │ └────────── month (1 - 12) │ │ └─────────────── day of month (1 - 31) │ └──────────────────── hour (0 - 23) └───────────────────────── min (0 - 59)

source Wikipedia - but modified


Special Keywords

Keyword | Equivalent | Description ------------- | ------------- | ------------- @yearly OR @annually | 0 0 1 1 * | Run one time a year, on midnight, January 1. @monthly | 0 0 1 * * | Run one time a month, on midnight, first day of month. @weekly | 0 0 * * 0 | Run once a week, on midnight, on Sunday. @daily | 0 0 * * * | Run once a day, on midnight. @hourly | 0 * * * * | Run once a hour, on initial minute of it.


###Syntax Rules

  • * - Means deactivated OR if not alone, means anything.
  • 1 (or any number) - Only this number will match.
  • 1,9 OR 1,2,3 - Any of these will match.
  • 1-3 - Range (same as 1,2,3).
  • 1,3-5 - Range and individual (same as 1,3,4,5).

All these commands can be combined with two stage command using the character /.


###Samples

  • * * * * * http://example.com - Deactivated cronjob

  • @monthly http://example.com - Will run each month.

  • */* * * * * http://example.com - Will run each 1 minute.

  • * */* * * * http://example.com - Will run each 1 minute.

  • 2/* * * * * http://example.com - Will run every 2 minutes ,checking each minute.

  • 6/2 * * * * http://example.com - Will run every 12 minutes in one hour.

  • 6,2/2 * * * * http://example.com - Will run every 12 and 4 minutes.

  • 2-4/* * * * * http://example.com - Will run every 2,3,4 minutes. (Will not call two times if have an collision, as this sample)

  • */5 * * * * http://example.com - Will run on any minute divisible 5.

  • */7,9 * * * * http://example.com - Will run each on minutes 0,7,9,14,18 and any others divisible by 7 or 9 until 59, that is the minutes limit.

  • */7-9 * * * * http://example.com - Will run each on minutes 0,7,8,9 and any others divisible by 7,8, or 9 until 59, that is the minutes limit.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

MIT