# cron-ping

> Background process that pings addresses.

Latest version **0.0.6** (published 2014-11-30) · ISC license · 0 weekly downloads

## Install

```sh
npm install cron-ping
pnpm add cron-ping
yarn add cron-ping
bun add cron-ping
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2014-11-30 |
| First published | 2014-11-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | M. Elliot Frost |
| Maintainers | frostme |
| Keywords | ping, cron, site, job |

## Links

- npm: https://www.npmjs.com/package/cron-ping
- npm.io page: https://npm.io/package/cron-ping

## Dependencies (1)

- [cron](https://npm.io/package/cron.md) ^1.0.5

## Alternatives

- [cron](https://npm.io/package/cron.md) — 4.9M weekly downloads
- [@vercel/queue](https://npm.io/package/@vercel/queue.md) — 731.6K weekly downloads
- [create-sonicjs](https://npm.io/package/create-sonicjs.md) — 1.6K weekly downloads
- [@exellix/jobs-api](https://npm.io/package/@exellix/jobs-api.md) — 941 weekly downloads
- [@forwardimpact/libskill](https://npm.io/package/@forwardimpact/libskill.md) — 575 weekly downloads

## Recent versions

- 0.0.6 (latest) — 2014-11-30
- 0.0.5 — 2014-11-25
- 0.0.4 — 2014-11-25
- 0.0.0 — 2014-11-25

## README

cron-ping
======

Background process module to ping your websites.

## Installation
```
npm install cron-ping
```

## Usage
```js
var cronPing = require('cron-ping');

var sites = ['http://www.google.com','http://www.yahoo.com','http://www.bing.com'];

var cb = function(res, site){
  console.log('Got ' + res.statusCode + ' for ' + site);
});
var stop = function(){
  console.log('Monitoring has stopped');
};

cronPing.monitor('0,10,20,30,40,50 * * * * *', sites, cb, stop);
```

## Forever
You can use forever to run cron-ping as a background process. Put your entire usage into a single file.
For example pinger.js
```
npm install forever -g
forever start pinger.js
```

## API
- monitor(pattern, sites, cb, stop)
  - pattern: Cron Job pattern. [More on cron patterns](http://crontab.org/)
  - sites:   Array of string urls for which you want to monitor.
  - cb:  callback that takes two arguments, res, and site.
  - stop: callback to be called when monitoring is stoppped

---
_Source: https://npm.io/package/cron-ping · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
