View | Details | Raw Unified | Return to bug 20897
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt (+3 lines)
Lines 36-41 Link Here
36
                                    <li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=to_marc">View MARC conversion plugins</a></li>
36
                                    <li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=to_marc">View MARC conversion plugins</a></li>
37
                                    <li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=opac_online_payment">View online payment plugins</a></li>
37
                                    <li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=opac_online_payment">View online payment plugins</a></li>
38
                                    <li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=intranet_catalog_biblio_enhancements">View intranet catalog biblio enhancement plugins</a></li>
38
                                    <li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=intranet_catalog_biblio_enhancements">View intranet catalog biblio enhancement plugins</a></li>
39
                                    <li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=cronjob">View cronjob plugins</a></li>
39
                                </ul>
40
                                </ul>
40
                            </div>
41
                            </div>
41
                        </div>
42
                        </div>
Lines 56-61 Link Here
56
                                <div class="dialog message">No plugins that can process online payments via the public catalog are installed</div>
57
                                <div class="dialog message">No plugins that can process online payments via the public catalog are installed</div>
57
                            [% ELSIF method == 'intranet_catalog_biblio_enhancements' %]
58
                            [% ELSIF method == 'intranet_catalog_biblio_enhancements' %]
58
                                <div class="dialog message">No plugins that can enhance the intranet catalog biblio records are installed</div>
59
                                <div class="dialog message">No plugins that can enhance the intranet catalog biblio records are installed</div>
60
                            [% ELSIF method == 'cronjob' %]
61
                                <div class="dialog message">No plugins that are run regularly via cronjob are installed</div>
59
                            [% ELSE %]
62
                            [% ELSE %]
60
                                <div class="dialog message">Unknown plugin type <i>[% method | html %]</i></div>
63
                                <div class="dialog message">Unknown plugin type <i>[% method | html %]</i></div>
61
                            [% END %]
64
                            [% END %]
(-)a/misc/cronjobs/run_cronjob_plugins.pl (-1 / +74 lines)
Line 0 Link Here
0
- 
1
#!/usr/bin/perl
2
3
# This script runs the 'cronjob' methods of installed plugins.
4
5
# Copyright 2020 Koha-Suomi
6
#
7
# This file is part of Koha.
8
#
9
# Koha is free software; you can redistribute it and/or modify it
10
# under the terms of the GNU General Public License as published by
11
# the Free Software Foundation; either version 3 of the License, or
12
# (at your option) any later version.
13
#
14
# Koha is distributed in the hope that it will be useful, but
15
# WITHOUT ANY WARRANTY; without even the implied warranty of
16
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
# GNU General Public License for more details.
18
#
19
# You should have received a copy of the GNU General Public License
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
21
22
use Modern::Perl;
23
use Getopt::Long;
24
use Pod::Usage;
25
26
BEGIN {
27
28
    # find Koha's Perl modules
29
    # test carefully before changing this
30
    use FindBin;
31
    eval { require "$FindBin::Bin/../kohalib.pl" };
32
}
33
34
use Koha::Plugins;
35
use C4::Context;
36
37
my $help    = 0;
38
39
GetOptions(
40
    'h|help'      => \$help,
41
);
42
43
if ($help) {
44
    pod2usage(1);
45
} else {
46
    if ( C4::Context->preference('UseKohaPlugins') && C4::Context->config("enable_plugins") ) {
47
        my @plugins = Koha::Plugins->new()->GetPlugins( { method => 'cronjob' } );
48
	foreach my $plugin (@plugins) {
49
	    $plugin->cronjob();
50
	}
51
    } else {
52
        warn "Koha plugins not enabled.";
53
    }
54
}
55
56
=head1 NAME
57
58
run_cronjob_plugins.pl
59
60
=head1 DESCRIPTION
61
62
Cron script to run the 'cronjob' methods of installed plugins.
63
64
=head1 SYNOPSIS
65
66
run_cronjob_plugins.pl
67
68
run_cronjob_plugins.pl -h
69
70
=head1 OPTIONS
71
72
-h : this help message
73
74
=cut

Return to bug 20897