b8a58c4934
Command-line scripts now use a new SCRIPT_DIR/kohalib.pl to put installed location of Koha's Perl modules into @INC.
18 lines
500 B
Perl
Executable file
18 lines
500 B
Perl
Executable file
#!/usr/bin/perl
|
|
#run nightly -- resets the services throttle
|
|
|
|
use strict; use warnings;
|
|
BEGIN {
|
|
# find Koha's Perl modules
|
|
# test carefully before changing this
|
|
use FindBin;
|
|
eval { require "$FindBin::Bin/../kohalib.pl" };
|
|
}
|
|
|
|
use C4::Context;
|
|
my $dbh=C4::Context->dbh;
|
|
my $fixit="UPDATE services_throttle SET service_count=0 WHERE service_type='xisbn'";
|
|
my $sth=$dbh->prepare($fixit);
|
|
my $res = $sth->execute() or die "can't execute";
|
|
print "$res\n"; #did it work?
|
|
$dbh->disconnect();
|