]> ruin.nu Git - ndwebbie.git/blob - scripts/tick.pl
Good to have the tick script here
[ndwebbie.git] / scripts / tick.pl
1 #!/usr/bin/perl -w
2
3 use strict;
4 use warnings;
5 use DBI;
6 use DBD::Pg qw(:pg_types);
7
8 use LWP::Simple;
9
10 our $dbh;
11 for my $file ("/home/whale/db.pl")
12 {
13         unless (my $return = do $file){
14                 warn "couldn't parse $file: $@" if $@;
15                 warn "couldn't do $file: $!"    unless defined $return;
16                 warn "couldn't run $file"       unless $return;
17         }
18 }
19
20 $dbh->trace("0","/tmp/scanstest");
21 my $update = $dbh->prepare("UPDATE misc SET value = value::int + 1 WHERE id = 'TICK'");
22 $update->execute();
23 $dbh->disconnect;