Skip to content

ndcorder/cronlens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CronLens

Build, explain, validate, and lint cron expressions in Python.

Installation

pip install cronlens

Quick Start

from cronlens import CronLens

expr = CronLens.every(5).minutes
print(expr)                     # */5 * * * *
print(expr.explain())           # Every 5 minutes
print(expr.validate().valid)    # True
print(expr.next(3))             # [datetime(...), ...]
print(expr.lint("linux"))      # []

parsed = CronLens("0 9 * * 1-5")
print(parsed.explain())

CLI Usage

cronlens explain "*/5 * * * *"
cronlens build --every 5m
cronlens build --daily --at 14:30
cronlens build --weekly --on monday --at 9:00
cronlens validate "*/5 * * * *"
cronlens next "0 9 * * 1-5" --count 10
cronlens lint "0 9 * * 0" --platform aws

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages