On Sun, Nov 9, 2008 at 6:23 PM, Henry Baragar <span dir="ltr">&lt;<a href="mailto:Henry.Baragar@instantiated.ca">Henry.Baragar@instantiated.ca</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I have been trying to use Net::SFTP: &nbsp;it works when I run the application from<br>
the shell, but not under cron!<br>
</blockquote><div><br>Cron as your user, or cron as the system cron?<br><br>cron provides a huge dearth of environment variables and other things that might be set up by your .login or .bashrc file.&nbsp; My guess is that there is something being provided by an envvar, shell alias, _something_ in your personal environment that your Perl program somehow depends upon.&nbsp; Or it might be something as simple as directory permissions and how they apply in the context of the system cron user.&nbsp; (might be root, might be cron, might be something else)<br>
<br>That debugging message hardly seems helpful, as it is telling where in the stack of depended-upon modules the failure occurs at.&nbsp; You should build some debugging / error trapping (eval) code around each line in your subroutine there to see where the failure actually occurs at from the perspective of your program.&nbsp; From there you can try to figure out how it is different when run as yourself and when run as cron.<br>
<br>Cheers,<br>&nbsp;- Richard<br><br></div></div><br>