cronenberg
simple cron command entry parser
cronenberg
provides two core components
TimeItem
: An enum that represents cron command time or date fieldCronItem
: A struct that represents cron command entry, for example,* * 5-7 1,2,5 8 sudo rm -rf /
Installation
cronenberg
is available on crates.io and can be included in your Cargo enabled project like this:
[]
= "0.2.0"
Then include it in your code like this:
extern crate cronenberg;
Example
extern crate cronenberg;
use CronItem;
use *;
use FromStr;
use ToString;
let s = "* * 5-7 1,2,5 8 ls -la";
assert_eq!;
let cron_item = CronItem ;
assert_eq!;
Contributing
- Fork it!
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Author
Ayrat Badykov (@ayrat555)
License
cronenberg is released under the MIT License.