Skip to content
This repository has been archived by the owner on Mar 29, 2022. It is now read-only.

boywithkeyboard/cronu

Repository files navigation

cronu

Simple, minimalistic scheduler, created by Azury.

Installation

Install the Package

Install cronu using your favorite package manager.

npm i cronu
yarn add cronu

Schedule a Job

import schedule from 'cronu'

const task = await schedule('1h', async ({ firedAt }) => {
  console.log('A job running every hour.')
  console.log(firedAt) // a date string in ISO format
})

await task.pause()
await task.resume()