Bug 41888 - Cronjob cleanup_database.pl doesn't delete old jobs either by age or type
Summary: Cronjob cleanup_database.pl doesn't delete old jobs either by age or type
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: 24.11
Hardware: Other Linux
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-02-19 16:53 UTC by Anke Bruns
Modified: 2026-02-19 16:53 UTC (History)
1 user (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anke Bruns 2026-02-19 16:53:26 UTC
The command 

perl /usr/share/koha/bin/cronjobs/cleanup_database.pl --confirm --jobs-days 7 --jobs-type all <instance> 

and several variations (e.g. only jobs-days or jobs-type parameter) does not purge any old jobs.

What may be the reason?

The solution in https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30914 was to fix 'delete if $verbose' and set 'delete if $confirm' instead, but I couldn't find the same mistake here.

The cleanup seems to fail also when the job runs as a cronjob in koha-common.