Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: perl script and cron

by snyder (Initiate)
on Mar 23, 2006 at 21:12 UTC ( [id://538872]=note: print w/replies, xml ) Need Help??


in reply to Re: perl script and cron
in thread perl script and cron

derby, with all due respect the post is not the same. I now have a working script. For some reason when cron runs it (as root) it FTP's a tarball to the remote server with the proper name. The problem is the the tar did not complete before the FTP portion of the script was executed. The file that is FTP'd is 1k and should be 60megs. If I run it from command line, it runs fine. The tarball is 60 megs and it show up on the remote server as such. The path to the directory is not an issue as I am running the script from the parent directory.

Replies are listed 'Best First'.
Re^3: perl script and cron
by Errto (Vicar) on Mar 23, 2006 at 21:26 UTC
    The path to the directory is not an issue as I am running the script from the parent directory.

    Yes, from the console but not from cron. When you run a program with cron you should safely assume that the current working directory is pretty much arbitrary. Therefore you need to either use an absolute path when checking the directory or explicitly set the current directory using chdir.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://538872]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-03-28 22:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found