npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

run-daily

1.0.0

@mafintosh

npmHomeRepoSnykSocket
Downloads:65
$ npm install run-daily
DailyWeeklyMonthlyYearly

run-daily

Run some functions at specific times each day. Poor mans cron in JS.

npm install run-daily

Usage

const runDaily = require('run-daily')

runDaily([ // specify some intervals (is utc)
  '15:30',
  '19:00',
  '00:00'
], function (i) {
  console.log('Time is:' + ['15:30', '19:00', '00:00'][i])
})

API

destroy = runDaily(times, fn)

Run a function at a specific time each day.

License

MIT