Modules@robinpath/cron
@robinpath/cron
0.1.0PublicCron expression parsing, validation, scheduling, and human-readable descriptions
@robinpath/cron
Cron expression parsing, validation, scheduling, and human-readable descriptions
Why use this module?
The cron module lets you:
- Validate a cron expression
- Parse cron expression into expanded fields
- Get next occurrence after a date
- Get next N occurrences
- Get previous occurrence before a date
All functions are callable directly from RobinPath scripts with a simple, consistent API.
Installation
npm install @robinpath/cron
Quick Start
No credentials needed — start using it right away:
cron.parse "0 9 * * 1-5"
Available Functions
| Function | Description |
|---|---|
cron.isValid | Validate a cron expression |
cron.parse | Parse cron expression into expanded fields |
cron.next | Get next occurrence after a date |
cron.nextN | Get next N occurrences |
cron.prev | Get previous occurrence before a date |
cron.matches | Check if a date matches a cron expression |
cron.describe | Human-readable description of a cron expression |
cron.between | Get all occurrences between two dates |
Examples
Parse cron expression into expanded fields
cron.parse "0 9 * * 1-5"
Get next occurrence after a date
cron.next "*/5 * * * *"
Get next N occurrences
cron.nextN "0 * * * *" 10
Integration with RobinPath
import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/cron";
const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);
const result = await rp.executeScript(`
cron.parse "0 9 * * 1-5"
`);
Full API Reference
See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.
Related Modules
@robinpath/json— JSON module for complementary functionality
License
MIT
Versions (1)
| Version | Tag | Published |
|---|---|---|
| 0.1.0 | latest | yesterday |
Related Modules
devops
0
@robinpath/bitbucket
v0.1.1robinpath
Bitbucket module for RobinPath.
0 downloads
...
devops
0
@robinpath/box
v0.1.1robinpath
Box module for RobinPath.
0 downloads
...
devops
0
@robinpath/cache
v0.1.1robinpath
In-memory key-value cache with optional TTL expiration for temporary data storage
0 downloads
...
devops
0
@robinpath/cloudflare
v0.1.1robinpath
Cloudflare module for RobinPath.
0 downloads
...
Install
$ robinpath install @robinpath/cron Version0.1.0
LicenseMIT
Unpacked Size4.5 KB
Versions1
Weekly Downloads0
Total Downloads0
Stars0
Last Publishyesterday
Createdyesterday

