cron alternatives and similar packages
Based on the "Parsing" category.
Alternatively, view cron alternatives based on common mentions on social networks and blogs.
-
trifecta
Parser combinators with highlighting, slicing, layout, literate comments, Clang-style diagnostics and the kitchen sink -
Earley
Parsing all context-free grammars using Earley's algorithm in Haskell. -
replace-megaparsec
Stream editing with Haskell Megaparsec parsers -
parser-combinators
Lightweight package providing commonly useful parser combinators -
descriptive
Self-describing consumers/parsers; forms, cmd-line args, JSON, etc. -
scanner
Fast non-backtracking incremental combinator parsing for bytestrings -
parsec-free
Parsec API encoded as a deeply-embedded DSL, for debugging and analysis -
incremental-parser
Haskell parsing combinator liibrary that can be fed the input and emit the parsed output incrementally -
data-stm32
ARM SVD and CubeMX XML parser and pretty printer for STM32 family -
replace-attoparsec
Stream editing with Haskell Attoparsec parsers -
parsec-parsers
Orphan instances so you can use `parsers` with `parsec`. -
record-syntax
A library for parsing and processing the Haskell syntax sprinkled with anonymous records -
matrix-market-attoparsec
Attoparsec parsers for the NIST Matrix Market format -
fuzzy-dates
Automatically detect and parse dates in many different formats -
streaming-binary
Incremental serialization and deserialization of Haskell values. -
antlrc
Haskell binding to the ANTLR parser generator C runtime library http://www.antlr.org/wiki/display/ANTLR3/ANTLR3+Code+Generation+-+C
Tired of breaking your main and manually rebasing outdated pull requests?
Do you think we are missing an alternative of cron or a related project?
README
cron
Cron data structure and Attoparsec parser for Haskell. The idea is to embed it in larger systems which want to roll their own scheduled tasks in a format that people are used to.
System.Cron
is where all the interesting datatypes live. You will also find
scheduleMatches
, which you can use to compare a time against a CronSchedule
to see if an action needs to be performed. System.Cron.Parser is where you will
find the parsers cronSchedule
, crontabEntry
and cronTab
. To parse
individual schedules up to full crontab files. System.Cron.Describe is where
you will find the describe
function for creating human-readable strings from
cron schedules, as well as any options to control how the description is created.
To do anything, you'll need to install cabal-dev with cabal.
To build, run:
make
To run tests, run:
make test
If you have inotify-tools, run this to run tests continuously.
make autotest
To generate docs:
make docs
Scheduler
Cron offers a scheduling monad which can be found in System.Cron.Schedule
. This monad transform allows you to declare a set of jobs (of the type IO ()
) that will be executed at intervals defined by cron strings.
main :: IO ()
main = do
...
tids <- execSchedule $ do
addJob job1 "* * * * *"
addJob job2 "0 * * * *"
print tids
...
job1 :: IO ()
job1 = putStrLn "Job 1"
job2 :: IO ()
job2 = putStrLn "Job 2"
Describe
main :: IO ()
main = do
let Right cs1 = parseCronSchedule "*/2 * 3 * 4,5,6"
print $ describe defaultOpts cs1
let Right cs2 = parseCronSchedule "*/2 12 3 * 4,5,6"
print $ describe (twentyFourHourFormat <> verbose) cs2