[wplug] perl / cron problem

Mike S lists at immuneit.com
Fri Oct 21 14:59:32 EDT 2005


Hello,

I'm wondering if there is anybody who can help me out with a little cron
problem I'm having.

I have a script, erBackup.pl, which basically tar's and scp's some files
to a remote host.  Note:  I use an encrypted id_rsa file, and have
ssh-agent running.

When I run it from bash, it works like a charm.  When I run it from cron,
I get emails from cron with the output of the program (sans std::out or
std::err from programs like tar and scp).  The script appears to run to
the end.

I use the following sub to call the commands I use (mostly tar and scp):

sub run (@)
{
    my @args = shift;
    system (@args) == 0 or die "\nSystem error: @args\nError: $@";
}


The program takes about three minutes to run when it works, but when cron
calls it, it hustles through in no time flat.  (Though some print commands
at the end of the script do appear in the output.)

And as if that weren't a perplexing enough problem for a Friday at 3:00pm,
there's one more twist.  Make sure you're sitting down.

I'm using cygwin.

Any thoughts?


More information about the wplug mailing list