in reply to Re: Running a Net::SFTP::Foreign script from cron
in thread Running a Net::SFTP::Foreign script from cron

For Windows users, the process is slightly more convoluted.
Seems like setting ssh_cmd => $sshcmd still results in a "Unable to connect: Connection to remote server is broken" error.

My solution to this was to create a ".bat" batch file which contains the command to execute the script perl "D:\Projects\sftp.plx"
Then using "Scheduled Task" to run the above batch file under a user account which can see the path specified in $ssh_cmd