Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Scheduled Task causing script to run under port 22

Start here:
https://winscp.net/eng/docs/faq_scheduler

If that does not help, please attach a full log file both from scheduled and manual run (using the latest version of WinSCP).

To generate log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
DougS

Scheduled Task causing script to run under port 22

Hi, I have a a scheduled task that is calling a batch file that opens a simple FTP connection. The task runs fine without any errors and the batch file runs manually without any errors. The FTP profile at the login dialog is set to connect using FTP under port 21. I can open the connection from the user interface. Manually running the batch file opens the connection on port 21 but if the batch file is run by the scheduled task it tries to connect under port 22 and then gets refused by the server. I've recreated the ftp connection but still the same result. Running the task under various accounts all produce the same result.

Is there a way in the script file to force port 21? I read where winscp defaults to port 22 and maybe that's what is causing it. I've tried appending :21 but it will show port 21 in the Host name but the Transfer protocol is still SFTP. Also there is a password for the ftp_user as well but it's not showing as having one in this log.

. 2015-07-02 08:32:19.068 Session name: ftp_user@ftp.******.com (Ad-Hoc site)
. 2015-07-02 08:32:19.068 Host name: ftp.******.com (Port: 21)
. 2015-07-02 08:32:19.068 User name: ftp_user (Password: No, Key file: No)
. 2015-07-02 08:32:19.068 Tunnel: No
. 2015-07-02 08:32:19.068 Transfer Protocol: SFTP (SCP)

Thanks for any help!