| 1 |
NAME |
| 2 |
Set::Crontab - Expand crontab(5)-style integer lists |
| 3 |
|
| 4 |
SYNOPSIS |
| 5 |
$s = Set::Crontab->new("1-9/3,>15,>30,!23", [0..30]); |
| 6 |
|
| 7 |
if ($s->contains(3)) { ... } |
| 8 |
|
| 9 |
DESCRIPTION |
| 10 |
Set::Crontab parses crontab-style lists of integers and defines |
| 11 |
some utility functions to make it easier to deal with them. |
| 12 |
|
| 13 |
Syntax |
| 14 |
|
| 15 |
Numbers, ranges, *, and step values all work exactly as described |
| 16 |
in the crontab(5) manpage. A few extensions to the standard syntax |
| 17 |
are described below. |
| 18 |
|
| 19 |
< and > |
| 20 |
<N selects the elements smaller than N from the entire range, |
| 21 |
and adds them to the set. >N does likewise for elements larger |
| 22 |
than N. |
| 23 |
|
| 24 |
! |
| 25 |
!N excludes N from the set. It applies to the other specified |
| 26 |
range; otherwise it applies to the specified ranges (i.e. "!3" |
| 27 |
with a range of "1-10" corresponds to "1-2,4-10", but ">3,!7" in |
| 28 |
the same range means "4-6,8-10"). |
| 29 |
|
| 30 |
Functions |
| 31 |
|
| 32 |
new($spec, [@range]) |
| 33 |
Creates a new Set::Crontab object and returns a reference to it. |
| 34 |
|
| 35 |
contains($num) |
| 36 |
Returns true if `$num' exists in the set. |
| 37 |
|
| 38 |
list() |
| 39 |
Returns the expanded list corresponding to the set. |
| 40 |
|
| 41 |
The functions described above croak if they are called with |
| 42 |
incorrect arguments. |
| 43 |
|
| 44 |
SEE ALSO |
| 45 |
The crontab(5) manpage. |
| 46 |
|
| 47 |
AUTHOR |
| 48 |
Abhijit Menon-Sen <[email protected]> |
| 49 |
|
| 50 |
Copyright 2001 Abhijit Menon-Sen <[email protected]> |
| 51 |
|
| 52 |
This module is free software; you can redistribute it and/or modify |
| 53 |
it under the same terms as Perl itself. |