Pegex::Crontab - Pegex crontab Parser
use Pegex::Crontab; $crontabs = Pegex::Crontab->new->parse( "0 5 * * 1 tar -zcf /var/backups/home.tgz /home/" . "\n" ); use feature qw( say ); say $crontabs->[0]->{cmd}; # "tar -zcf /var/backups/home.tgz /home/" say $crontabs->[0]->{min}; # "0" say $crontabs->[0]->{hour}; # "5" say $crontabs->[0]->{dom}; # "*" say $crontabs->[0]->{mon}; # "*" say $crontabs->[0]->{dow}; # "1"
Pegex::Crontab is a crontab parser written in Pegex.
Pegex
Ingy döt Net <ingy@cpan.org>
Copyright 2011-2014. Ingy döt Net.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html
To install Pegex::Crontab, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Pegex::Crontab
CPAN shell
perl -MCPAN -e shell install Pegex::Crontab
For more information on module installation, please visit the detailed CPAN module installation guide.