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

jpratt wrote:

When I run it manually I am logged in with the same account that runs it as a scheduled task.

Sorry I have no more ideas.
jpratt

When I run it manually I am logged in with the same account that runs it as a scheduled task.
martin

How do you run it manually? Do you use the same account?
jpratt

I think maybe it is timing out while waiting to connect, but when I manually launch the scheduled task (right click, run now) it correctly waits for the response from the server and transfers the files.
Because I can manually run the scheduled task I don't think it has anything to do with the key.

Here's the log


. 2007-11-06 02:30:00.605 --------------------------------------------------------------------------
. 2007-11-06 02:30:00.605 WinSCP Version 4.0.5 (Build 354) (OS 5.2.3790 Service Pack 1)
. 2007-11-06 02:30:00.605 Login time: Tuesday, November 06, 2007 2:30:00 AM
. 2007-11-06 02:30:00.605 --------------------------------------------------------------------------
. 2007-11-06 02:30:00.605 Session name: user@server.com
. 2007-11-06 02:30:00.605 Host name: ftp.server.com (Port: 22)
. 2007-11-06 02:30:00.605 User name: user (Password: Yes, Key file: No)
. 2007-11-06 02:30:00.605 Tunnel: No
. 2007-11-06 02:30:00.605 Transfer Protocol: SFTP (SCP)
. 2007-11-06 02:30:00.605 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2007-11-06 02:30:00.605 Proxy: none
. 2007-11-06 02:30:00.605 SSH protocol version: 2; Compression: No
. 2007-11-06 02:30:00.605 Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2007-11-06 02:30:00.605 Ciphers: aes,blowfish,3des,WARN,des; Ssh2DES: No
. 2007-11-06 02:30:00.605 SSH Bugs: -,-,-,-,-,-,-,-
. 2007-11-06 02:30:00.605 SFTP Bugs: -,-,-
. 2007-11-06 02:30:00.605 Return code variable: Autodetect; Lookup user groups: Yes
. 2007-11-06 02:30:00.605 Shell: default, EOL: 0
. 2007-11-06 02:30:00.605 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2007-11-06 02:30:00.605 Alias LS: No, Ign LS warn: Yes, Scp1 Comp: No
. 2007-11-06 02:30:00.605 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2007-11-06 02:30:00.605 Cache directory changes: Yes, Permanent: Yes
. 2007-11-06 02:30:00.605 DST mode: 1
. 2007-11-06 02:30:00.605 --------------------------------------------------------------------------
. 2007-11-06 02:30:00.605 Looking up host "ftp.server.com"
. 2007-11-06 02:30:05.215 Connecting to xxx.xxx.xxx.xxx port 22
. 2007-11-06 02:30:20.356 Waiting for data timed out, asking user what to do.
. 2007-11-06 02:30:20.356 Asking user:
. 2007-11-06 02:30:20.356 Host has not answered for 15 seconds.
. 2007-11-06 02:30:20.356
. 2007-11-06 02:30:20.356 Wait for another 15 seconds? ()
martin

Re: unable to run as a scheduled task

What goes wrong?

Have you read this FAQ?
jpratt

unable to run as a scheduled task

Having problem getting WinSCP to run as a scheduled task on a windows machine.

I have a scheduled task running nightly that calls winscp.cmd which looks like this:
"C:\Program Files\WinSCP\WinSCP.exe" /console /script=winscp_transfer.txt /log=C:\pep\logs\era_transfer.txt


the script looks like this:
# Automatically answer all prompts negatively not to stall

# the script on errors
# option batch on 

# Disable overwrite confirmations that conflict with the previous
option confirm off

# Connect
open <username>:<password>@server.com

# Force binary mode transfer
option transfer binary

# Download file to the local directory c:\era\
get *.* c:\era\

# Remove transferred files from server
rm *.*

# Disconnect
close

# Exit WinSCP
exit



It runs if I manually run the scheduled task.