[Bug 20897] New: Add generic cronjob to run plugins with a 'cronjob' method
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20897 Bug ID: 20897 Summary: Add generic cronjob to run plugins with a 'cronjob' method Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz Sometimes there are ad-hoc cronjobs that need to be setup for a site, or there are plugins that need some regular tasks done. I was thinking an easy solution might be to package a generic cronjob into koha that would run daily (or whenever) to check for plugins with a cronjob method. The plugins could allow for configuration of the job in their configure method so that users could have control over some jobs. Could be used for emailing reports or other things that might benefit from a user facing solution. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20897 Lisette <lisetteslatah@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lisetteslatah@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20897 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20897 paxed <pasi.kallinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |pasi.kallinen@koha-suomi.fi |ity.org | CC| |pasi.kallinen@koha-suomi.fi Status|NEW |Needs Signoff --- Comment #1 from paxed <pasi.kallinen@koha-suomi.fi> --- Created attachment 98803 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98803&action=edit Bug 20897: Add generic cronjob to run plugins with a cronjob method -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20897 --- Comment #2 from paxed <pasi.kallinen@koha-suomi.fi> --- Created attachment 98804 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98804&action=edit Plugin to test Bug 20897 This is a plugin to test bug 20897. All it does it implement the cronjob-method, and in that method, logs a warning: "PLUGIN Bug20897: CRONJOB" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20897 Liz Rea <wizzyrea@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20897 Liz Rea <wizzyrea@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #98803|0 |1 is obsolete| | --- Comment #3 from Liz Rea <wizzyrea@gmail.com> --- Created attachment 99017 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99017&action=edit Bug 20897: Add generic cronjob to run plugins with a cronjob method This adds a run_cronjob_plugins.pl script, which will run the cronjob-methods of the installed plugins. Test plan: 1) Enable plugins, upload the Bug20897 test plugin 2) Set up the run_cronjob_plugins.pl in cronjob 3) Check the cron logs to see the message "PLUGIN Bug20897: CRONJOB" shows up there every time the cronjob is run 4) Test that the plugins-home.pl -page can filter the cronjob plugins Signed-off-by: Pasi Kallinen <pasi.kallinen@koha-suomi.fi> Signed-off-by: Liz Rea <wizzyrea@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20897 --- Comment #4 from Liz Rea <wizzyrea@gmail.com> --- Created attachment 99018 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99018&action=edit Bug 20897 - add commented cron example to cron.hourly To test: Have a look at kohaclone/debian/koha-common.cron.hourly, see that there is a job in there for running the plugin cron jobs for every Koha instance. Signed-off-by: Liz Rea <wizzyrea@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20897 Liz Rea <wizzyrea@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |24668 See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=24668 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24668 [Bug 24668] Allow users to specify in plugins how often to run the plugin's cron -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20897 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Should not it be in misc/cronjobs/crontab.example as well? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20897 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- FAIL misc/cronjobs/run_cronjob_plugins.pl FAIL forbidden patterns forbidden pattern: tab char (line 48) forbidden pattern: tab char (line 49) forbidden pattern: tab char (line 50) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20897 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |RESOLVED CC| |martin.renvoize@ptfs-europe | |.com Resolution|--- |DUPLICATE --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Ooh.. not sure how I didn't find this one when I was creating bug 25245.. as that one has already reached PQA I'm going to mark this one as a duplicate.. though this one works hourly whereas the alternative works 'nightly'.. hmm *** This bug has been marked as a duplicate of bug 25245 *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org