Giter VIP home page Giter VIP logo

cron's Introduction

Fork

I've made some mods to the origina cron repository. Most notably, i've added "seconds" resolution. Would it be nice to add micros? Probably yes.

Install

make

Example

This simple example takes a "microsecond delay" and a "cron string" as arguments. It then sleeps for the microsecond delay and prints "ping" if the current time matches the schedule represented by the cron string.

./.cabal-sandbox/bin/ping 1000000 "*/2 * * * * *"

Parsing cron strings

 parseOnly cronSchedule "*/2 * 3 * 4,5,6"
 parseOnly cronScheduleLoose "*/2 * 3 * 4,5,6"
 parseOnly cronScheduleLooseGranular "* */2 * 3 * 4,5,6"

TODO

Cover my modifications via the already-existing test suite/hspec.

cron

Build Status

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.

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

Contributors

cron's People

Contributors

adarqui avatar albertov avatar michaelxavier avatar sol avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.