ReportSchedule(3pm)
π ReportSchedule(3pm) β the Lire::ReportSchedule glow-up π
okay so bestie, gather round, because this is the Lire::ReportSchedule page from LogReport's Lire Documentation, and it's literally the object that represents one periodical report generation. yes. it's giving "the schedule of your reporting dreams." let's get into it π
β¨ SYNOPSIS β¨
like, here's the whole vibe in code:
use Lire::ReportJob;
use Lire::ReportSchedule;
my $store = Lire::DlfStore->open( 'aStore' );
my $job = new Lire::ReportJob( "webServer" );
my $cfg = $store->get_report_config( 'daily_www_report' );
$job->add_schedule( new Lire::ReportSchedule( 'daily', $cfg );
$job->run( 'daily', $store );
no cap, that's the whole flex π«Ά
π¦ DESCRIPTION π¦
so Lire::ReportSchedule objects, when they team up with Lire::OutputJob objects, make it possible to configure all kinds of periodical report generation. iconic behavior honestly π
here's the split, because it matters:
Lire::OutputJobis the one that represents the formatting of one generated report.Lire::ReportSchedulerepresents such a generation itself.
and it will be used to generate periodically one XML report in a DlfStore, using one report configuration file. one report, one config, on a loop. periodt π
now, ReportSchedules grouped together in one ReportJob are assumed to generate compatible reports as far as merging is concerned. the idea (and it's kind of a slay) is that previous reports generated in one ReportJob β according to different schedules β could be used as a data source when the DlfStore doesn't contain all the DLF records for the whole period. like, for example: if you don't keep one year of www DLF in your store, you could still generate an yearly report using the daily reports generated during the year. stacking your little reports into a big one, iykyk π
π§ new( $period, $cfg );
creates a new Lire::ReportSchedule that will generate an XML report using the Lire::ReportConfig $cfg on a $period period.
and $period should be one of:
'hourly''daily''weekly''monthly''yearly'
those five, bestie, no substitutions π
π period()
returns the period of this ReportSchedule. that's it. that's the whole method. short queen π
β period_range( [ $time ] )
returns the starting and ending boundaries of the schedule period which includes $time. (defaults to now, obviously.)
important detail, don't miss it: the ending boundary is excluded from the period, and the starting boundary is included. so it's like [start, end). fancy math vibes β¨
π report_config( [ $new_cfg ] )
returns (and optionally changes) the Lire::ReportConfig object to use for this schedule. give it $new_cfg and it swaps it out; give it nothing and it just tells you what's up π
πΈ init_report_config( [ $time ] )
returns the Lire::ReportConfig object with filters set. a FilterSpec will have been added to each section of the ReportConfig object, and it will restrict the reporting to the period defined for the schedule.
the boundaries of that period are determined according to $time, which defaults to now. the schedule's little time bubble, basically π«§
π₯ add_output_jobs( $job, ... )
adds one or more Lire::OutputJob to the ReportSchedule object. plural in the name, plural in the arg list. keep up π
π output_jobs()
returns the Lire::OutputJobs related to this object. your jobs, delivered π
π run( $store, $report_job, [$time] )
generate an XML report and save it in the $store Lire::DlfStore.
the report will be generated either using the DlfStreams or previously generated reports. preference is given to generating the report using the Dlf data. for more details, consult the documentation of find_report_source() in Lire::DlfStore(3pm). (yes, go read that one too, i'll wait π«Ά)
the period for which the report will be generated is done using the $time parameter, which defaults to now. for example, a 'daily' report will generate a report for the whole day (midnight-midnight based on the day that $time represents). literally the whole 24 hours, no crumbs π
once the report is generated, all registered OutputJob will be run with the new report. everyone gets a copy, bestie π
note from the original page, fr fr: it says "Preferences is giving to generating the report using the Dlf data" β i'm not fixing their typo, i'm just honoring it. the meaning is clear: Dlf data wins π
π SEE ALSO π
π«Ά AUTHOR π«Ά
Francis J. Lacoste <flacoste@logreport.org> β the icon who wrote this π
π VERSION π
$Id: ReportSchedule.pm,v 1.17 2006/07/23 13:16:29 vanbaal Exp $
π COPYRIGHT π
Copyright (C) 2004 Stichting LogReport Foundation LogReport@LogReport.org
this file is part of Lire.
Lire is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
this program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. see the GNU General Public License for more details.
you should have received a copy of the GNU General Public License along with this program (see COPYING); if not, check with http://www.gnu.org/copyleft/gpl.html. go get your license, bestie π
and that's the whole page! no notes, we ate π½οΈβ¨
sign-off era: this glamorous little page is from Lire 2.1.1, dated 2025-09-28, and it's filed under the manual name ReportSchedule(3pm) β catch you in the group chat, mwah ππ
π¦ where this page comes from
- arch rolling: lire 2.1.1-8 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms