crontab script



Hello,
i was trying to create a script that checks if internet connection and
if it is off the perl script tries to connect again and lunch a perl
script.
it opens a txt file, get the timestamp. in $differenza i get the
difference between now and the timestamp in the txt file (in this file
i write with blog.pl the operation time timestamp ). if the difference
is more than 10000 seconds it means the connection is off so it tries
to connect again. and if the difference is more than 500 it start the
blog.pl process again. i did put this file in the crontab list:
*/1 * * * * perl /home/user/perl/crontab.pl
but the blog.pl never stars. Why???


this is the code of crontab.pl:

$ora_aggiornata=time();
open (CHECKBOOK, "timestamp.txt");
$timestamp = <CHECKBOOK>;
$differenza=$ora_aggiornata-$timestamp;
print "$differenza\n";
if ($differenza > 10000){
$ifc=`ifconfig | grep P-t-P`;
if ($ifc eq "") {
`poff dsl-provider`;
`sleep 1`;
`pon dsl-provider`;
}
}
if ($differenza > 500) {
exec("perl blog.pl &");
} else {
print "no not yet\n";

}
.



Relevant Pages

  • Re: crontab script
    ... if it is off the perl script tries to connect again and lunch a perl ... get the timestamp. ...
    (comp.lang.perl.misc)
  • Re: crontab script
    ... if it is off the perl script tries to connect again and lunch a perl ... get the timestamp. ...
    (comp.lang.perl.misc)
  • Entering a TimeStamp value into DB2
    ... I have been able to write a perl script which can ... enter an 'integer' or 'varchar' value into a DB2 table. ... enter a 'TimeStamp' value into the same table. ...
    (perl.dbi.users)
  • Re: crontab script
    ... if it is off the perl script tries to connect again and lunch a perl ... Debug it outside of cron first. ...
    (comp.lang.perl.misc)
  • [NEWS] IBM Informix Web DataBlade Local Root by Design
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... that ease development of "intelligent", interactive, Web-enabled database ... person who has access to change the Perl script. ...
    (Securiteam)