Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/Service/CronService.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ private function runCli(string $appMode, ?array $jobClasses): void {
private function runWeb(string $appMode): void {
if ($appMode === 'cron') {
// Cron is cron :-P
throw new \RuntimeException('Backgroundjobs are using system cron!');
$this->logger->info('WebCron accessed even though backgroundjobs_mode is set to use system cron.', ['app' => 'cron']);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure because recommended log level is warning and then you would not get this warning about invalid access.
I think at least warning is the correct log level.

But also one can argue that the behavior is expected - you configured system cron but silently allow arbitrary webcron access?

Copy link
Copy Markdown
Member Author

@joshtrichards joshtrichards Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The invalid access isn't an actual service problem. At best it may indicate a forgotten prior external cron setup (that isn't accomplishing anything); at worst it's noise from bots probing. I'd rather have the endpoint "disappear" (in a default situation) if webcron isn't in use. This is basically just an info or debug thing IMO. Particularly since the admin can't do anything about the second scenario.

} else {
// Work and success :-)
$job = $this->jobList->getNext();
Expand Down
Loading