From: Michael Andreen Date: Sun, 2 Sep 2007 10:46:05 +0000 (+0200) Subject: Good to have the tick script here X-Git-Url: https://ruin.nu/git/?p=ndwebbie.git;a=commitdiff_plain;h=ee9b38473af96baf1b084b962f3407e7e5f419ef Good to have the tick script here --- diff --git a/scripts/tick.pl b/scripts/tick.pl new file mode 100755 index 0000000..bb652a8 --- /dev/null +++ b/scripts/tick.pl @@ -0,0 +1,23 @@ +#!/usr/bin/perl -w + +use strict; +use warnings; +use DBI; +use DBD::Pg qw(:pg_types); + +use LWP::Simple; + +our $dbh; +for my $file ("/home/whale/db.pl") +{ + unless (my $return = do $file){ + warn "couldn't parse $file: $@" if $@; + warn "couldn't do $file: $!" unless defined $return; + warn "couldn't run $file" unless $return; + } +} + +$dbh->trace("0","/tmp/scanstest"); +my $update = $dbh->prepare("UPDATE misc SET value = value::int + 1 WHERE id = 'TICK'"); +$update->execute(); +$dbh->disconnect;