[Koha-bugs] [Bug 24968] Add Syspref controls for cronjobs

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Nov 19 06:51:44 CET 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24968

--- Comment #6 from David Cook <dcook at prosentient.com.au> ---
I'm bumping into this with "/usr/share/koha/bin/cronjobs/membership_expiry.pl"
where 1 library wants to send notices to only some categories.

In the past, we added a --category option, but that only worked when we set up
cronjobs per-library instead of using koha-foreach. 

I think that I'm just going to use a local system preference here and a local
code customization, but it would be useful for libraries to be able to define
their own parameters via the web UI for this cronjob...

Really this is a "scheduled task" issue. Not just "cronjobs". In the future, we
may have other schedulers in addition to the cron daemon. So whatever solution
we come up with... it should be fairly extensible. 

Scheduled Task:
Name: MembershipExpiry
Args:
  Categories: ['Staff','Students','Administrators']
  Branches: ['CPL','MPL','QPL']
  Letter: 

A cronjob could fetch using my $task =
ScheduledTask->GetByName('MembershipExpiry');

You could even arguably add "Min time interval" (maybe the cronjob runs every
15 minutes but you only want the job to run no faster than 1 time per hour) and
"Last run" to try to control timing a bit... 

Anyway, just some thoughts

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list