npm

Don't miss out on this year's npm Pride t-shirt designs!Order your favorites here »

magnet-node-schedule

2.0.0 • Public • Published

Usage

All router api should refer node-schedule This module techinicall no need to convert to magnet

Basic

import magnet from 'magnet-core'
import Config from 'magnet-config'
import Logger from 'magnet-bunyan'
import Schedule from 'magnet-node-schedule'

let app = await magnet([Config, Logger, Schedule])

server/jobs/test.js

import _promise from 'bluebird'

export default function ({ nodeSchedule }) {
  nodeSchedule.scheduleJob(
    '*/1 * * * * *',
    async function process () {
      console.log('testing scheduler 2222', await _promise.resolve('hey').timeout(1000))
    }
  )
}

install

npm i magnet-node-schedule

Downloadsweekly downloads

55

version

2.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability