Name : perl-Schedule-Match
| |
Version : 0.07
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp155.6.1
| Date : 2023-07-20 16:52:43
|
Group : Development/Libraries/Perl
| Source RPM : perl-Schedule-Match-0.07-lp155.6.1.src.rpm
|
Size : 0.02 MB
| |
Packager : https://www_suse_com/
| |
Summary : Handles and detects clash between pattern-based schedules
|
Description :
This library allows you to manage schedule which has structure similar to crontab(5) format. It offers methods to detect clash between schedules (with or without duration considered), and can also tell when, and how often they clash.
From the viewpoint of data structure, one major difference compared to crontab(5) is a concept of duration. Each schedule has its own duration, and clash detection can be done upon that. For more information on data structure, please consult SCHEDULE STRUCTURE section below.
All schedules are assumed to be in the same timezone. You will have to align them beforehand if not.
Currently available methods are as follows:
* AATTwhen = lcheck($this, $deep, $keep, $init, $last);
Returns list of UNIX times which is a time given schedule gets invoked.
* AATTwhen = scheck($this, $that, $deep, $keep, $init, $last);
Detects clash between given schedules _without_ considering duration. Returns the list of clash time (empty if not). It is safe to assume the list is sorted.
Options are:
* - $deep
Sets the \"depth\" of clash detection. If set to false, it will report only one clash (first one) per day.
* - $keep
Sets the maximum number of clashes to detect. Defaults to 1.
* - $init
Set the starting time of timespan to do the detection. Defaults to the moment this method is called.
* - $done
Set the closing time of timespan to do the detection. Defaults to 3 years after $init.
* $list = rcheck($exp0, $exp1, $deep, $keep, $init, $done);
Detects clash between given schedules _with_ duration considered.
This is almost compatible with *scheck* except that $deep and $keep option does not work as expected (for current implementation). For $deep, it is always set to 1, and for $keep, you would need to specify much larger value (I cannot give the exact number since it depends on how often two schedules clash).
* $bool = isleap($year);
Returns wheather given year is leap year or not. Returns true if it is, false otherwise.
* $hash = uthash($time[, $life]);
Create schedule structure from given UNIX time. Optionally, you can also set the duration of created schedule (which defaults to 0).
* AATTtime = localtime($time);
Converts a time as returned by the time function to a 11-element array with the time analyzed for the local time zone.
Except for appended 10th and 11th element, this is compatible with built-in *localtime*.
Appended 2 elements (10th and 11th) are \"week of the month\" and \"occurence in the month\", both in 1-indexed style.
* AATTlist = expand($expr, \\AATTfill);
Function to expand given crontab(5)-like expression to the list of matching values. \\AATTfill is used to expand wildcard.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-S/15.5/noarch |