Hi @bozana ,
What is your job configuration, from the config.inc.php?
default_connection = “database”
default_queue = “queue”
job_runner = On
job_runner_max_jobs = 2
job_runner_max_execution_time = 3000
job_runner_max_memory = 880
delete_failed_jobs_after = 10
Do you collect daily or only monthly statistics?
daily
run that CLI script
I have no cli access. What I am doing now in testing environment is changing so it would run more frequently instead of daily in classes/scheduler/Scheduler.php
$usageEvent = $this // VU: captured into a variable for the frequency override below
->schedule
->call(fn () => (new UsageStatsLoader([]))->execute())
->daily()
->name(UsageStatsLoader::class)
->withoutOverlapping();
VUScheduleConfig::applyUsageStatsLoaderFrequency($usageEvent); // VU
public static function applyUsageStatsLoaderFrequency(Event $event): void
{
$everyMinutes = (int) Config::getVar('schedule', self::USAGE_STATS_LOADER_EVERY_MINUTES_KEY, 0);
if ($everyMinutes >= 1 && $everyMinutes <= 59) {
$event->cron('*/' . $everyMinutes . ' * * * *');
}
VULogger::log(
'VU: schedule frequency applied. key=' . self::USAGE_STATS_LOADER_EVERY_MINUTES_KEY
. ' expression=' . $event->expression
);
}
but in the docs I see
Note: This requirement only applies if the site is configured to keep monthly statistics only. If daily statistics are kept, you can reprocess individual days without needing all log files for the month.
so do I really need to process whole month logs instead of just what is not processed?
Overall this is working at least in testing looks like, I was just not sure if it is working correctly, AI just suggested to move to stage, I did that, just wanted to verify AI is right.
I actually I mostly tested with hardcoded function call like everyTwoMinutes() but recently changed to take it from config this way. Only problem that I am modifying source files but hmm, with cli access I would not need that, so maybe thats a reason for asking CLI access. Unless you know better way without CLI access.