An open API service indexing awesome lists of open source software.

https://github.com/julien-r44/cron-expression-generator

🔧 Generate crontab expression using friendly and declarative API
https://github.com/julien-r44/cron-expression-generator

cron crontab nodejs

Last synced: 7 months ago
JSON representation

🔧 Generate crontab expression using friendly and declarative API

Awesome Lists containing this project

README

          



Cron Expression Generator


Generate crontab expression using friendly and declarative API heavily inspired by Laravel.





# Installation
```bash
npm install cron-expression-generator
pnpm install cron-expression-generator
```

# Usage

```ts
// ESM
import { cron } from 'cron-generator-expression'

// CJS
const { cron } = require('cron-generator-expression')

const expression = cron().mondays().everyTwoMinutes().get()
console.log(expression) // */2 * * * 1
```

## License

[MIT](./LICENSE) License © 2022 [Julien Ripouteau](https://github.com/Julien-R44)