Topic "Help with Windows Server 2008 Scheduled Task"

Author Message
wongnation
[View user's profile]

Joined: 2013-03-12
Posts: 2
OK, I'm probably missing something obvious, but I am having difficulty getting a Windows 2008 Server Scheduled Task to execute WinScp.com correctly.

The task is configured to run with the highest privileges and as a specific user account. The command runs fine when I log in as that user account and run the task manually. (The user account is also a domain admin). I have also selected the "Run whether user is logged in or not" option. The "Start in (optional)" field is also set to the WinScp directory (C:\Program Files (x86)\WinSCP).

However, when I select "Run" to trigger the scheduled task to execute, it seems to run indefinitely.

From viewing the Task Manager, I can see the winscp.com and winscp.exe processes start up, but they never end (until I manually end the task or kill the processes).

For sanity's sake, I tried modifying the scheduled task to something simple:
Code:
winscp.com /log=foo.log /command "exit"


where the arguments are specified in the "Add arguments (optional)" dialog and even this seems to hang when run as a scheduled task. But this runs fine when I execute it from the Windows command line.

One thing is that the Windows Task Scheduler service is configured to run as the Local System, but I assumed that the specified user account would override that. Also, no log file is generated, but since I am not even connecting to a host, that's somewhat expected.

Again, I apologize in advance if I've missed something obvious, but was wondering if anyone else had run into this. I am running v5.1.4.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24994
Location: Prague, Czechia
Thanks for your report.

The above command should definitely never hang.

I have sent you an email with a debug version of WinSCP to address you have used to register on this forum.
_________________
Martin Prikryl
wongnation
[View user's profile]

Joined: 2013-03-12
Posts: 2
Thanks Martin, I have sent you the trace/log file.
Difranev

Guest


Hi,

what was wrong? did you find anything? I have exactly the same issue and it's driving me nuts.
Working correctly when i launch the script manually but winscp.exe and winscp.com are hanging in the task manager and do nothing when launch by scheduled task

Please help :'((

Eve.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24994
Location: Prague, Czechia
Difranev wrote:
what was wrong? did you find anything? I have exactly the same issue and it's driving me nuts.
Working correctly when i launch the script manually but winscp.exe and winscp.com are hanging in the task manager and do nothing when launch by scheduled task

Did you read FAQ?
https://winscp.net/eng/docs/faq_scheduler
_________________
Martin Prikryl
trefrog

Guest


My problem was that WinSCP.exe wasn't exiting when I ended the task via the Task Scheduler, so my first two test runs were actually still running in the background, and downloading humungous things that I was trying to exclude...

provided that your ini settings, script, and task options are all in order... as per the FAQ.

all I had to do was use WinSCP.com instead of ".exe /console". That's it. That change alone fixed the problem!
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24994
Location: Prague, Czechia
trefrog wrote:
My problem was that WinSCP.exe wasn't exiting when I ended the task via the Task Scheduler, so my first two test runs were actually still running in the background, and downloading humungous things that I was trying to exclude...

Do you mean that you ended winscp.com process and a winscp.exe process was not terminated along? That should not be happening, unless you use some ancient version of WinSCP (4.1.3 or older) or Windows (2000 or older).
See https://winscp.net/tracker/show_bug.cgi?id=246
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License