rabie has asked for the wisdom of the Perl Monks concerning the following question:
any ideas? i tried wrapping the perl in php script and in shell script and no luck. the log file (test.out) shows nothing, too. thank you for your help#cron #------ 59 10 * * * perl /home/rabie/test.pl 1 2 3 > /home/rabie/test.out #perl #---- # catch the the passed arrguments my($val1, $val2, $val3) = @ARGV; # # manipulate the values in perl, then add them to the database # # MYSQL STUFF my $username='rabie'; my $password='test'; my $database='feeds'; eval{ # checking on status print "good so far! \n"; # Connect to the database. my $dbh = DBI->connect("DBI:mysql:database=$database",$username,$p +assword,{'RaiseError' => 1}); # sql insert query my $query="call feeds.inputfeed(?,?,?);"; $dbh->do($val1,$val2,$val3); }; if ($@){ ### catch block print "Failed! \n"; };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perl /cron /DBI
by almut (Canon) on Jun 12, 2009 at 11:31 UTC | |
|
Re: perl /cron /DBI
by shekarkcb (Beadle) on Jun 12, 2009 at 11:35 UTC | |
|
Re: perl /cron /DBI
by Anonymous Monk on Jun 12, 2009 at 13:05 UTC | |
|
Re: perl /cron /DBI
by Bloodnok (Vicar) on Jun 12, 2009 at 16:06 UTC | |
|
Re: perl /cron /DBI
by mikelieman (Friar) on Jun 12, 2009 at 19:48 UTC |