From ee9b38473af96baf1b084b962f3407e7e5f419ef Mon Sep 17 00:00:00 2001 From: Michael Andreen Date: Sun, 2 Sep 2007 12:46:05 +0200 Subject: [PATCH] Good to have the tick script here --- scripts/tick.pl | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 scripts/tick.pl 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; -- 2.39.2