Bug 3482 changed name of notices file
[koha.git] / misc / cronjobs / services_throttle.pl
1 #!/usr/bin/perl
2 # run nightly -- resets the xisbn services throttle
3
4 use strict;
5 use warnings;
6
7 BEGIN {
8     # find Koha's Perl modules
9     # test carefully before changing this
10     use FindBin;
11     eval { require "$FindBin::Bin/../kohalib.pl" };
12 }
13
14 use C4::Context;
15 my $fixit="UPDATE services_throttle SET service_count=0 WHERE service_type='xisbn'";
16 my $sth = C4::Context->dbh->prepare($fixit);
17 my $res = $sth->execute() or die "cannot execute query: $fixit";
18
19 # There is no need to return anything if we succeeded, 
20 # and the die message (or other more internal Context/mysql error) 
21 # will get emailed to the cron user if we didn't.