Recognise WinSCP is running

Advertisement

gluepack
Donor
Joined:
Posts:
28
Location:
Bulgaria

Recognise WinSCP is running

I provide data to weather services and also update my own site.
I had so many problems with the weather software not being able to FTP my data to my site ISP that I opted for it invoking an external program to do that.
I use WinSCP.com, called via a bat file with a script parameter and the bat file is invoked from a vbs that is called by the program.
The vbs is invoked every 15 seconds and, typically, the transfer to my website by WinSCP takes 10 seconds.
Up until nine months ago, I was going through hell with my ISP blocking my IP due to too many sessions (although trying to get a straight answer out of them was difficult). At that time I was updating every 10 seconds and switching to 15 seemed to have cured it.
Recently, I started an invocation of a second vbs, every hour, that uploads about 200k of different files and takes about 15 seconds.
Also, updating my website software is handled from a different machine (same IP) on an ad hoc basis using WinSCP manually.
So, at any one time, I could have three WinSCP sessions running in parallel.
Yesterday was the first time in nine months that they have blocked my IP address and ostensibly for the same reason.
However, the hourly invocation of WinSCP wasn't running at the same time.
Looking at the first log they sent (which wasn't for the period they blocked me) the hourly upload overlapped two 15 second uploads without a problem and, anyway, it has been running like that for a couple of days without a problem.
The second log from the ISP shows one of the 15 second runs lasting for 30+ seconds (god knows why) and overlapping another one that would have been 30 seconds later without the intermediate 15 second run happening. Another login occurs, which was to be a manual upload. Then another 15 second run login occurs and that was when my IP address was blocked.
Anyway, the big problem is that, as in the past, these people typically take 12 hours to unblock my IP address which is ludicrous.
So, what I need to know is whether there is any way that I can inhibit a further invocation of WinSCP.com, if it is already running, either delaying it (in the case of the hourly run) or abandoning it, in the case of the 15 second run (or both), in order to try and remove any chance of this happening again.

i.e. something like...
A> A> A> A> ......... A> A>
.....................B>>>.......

Reply with quote

Advertisement

gluepack
Donor
Joined:
Posts:
28
Location:
Bulgaria

ok, as simple as

tasklist | find "WinSCP.com" >nul: && GOTO :eof

in the 15 second batch file and

:check
tasklist | find "WinSCP.com" >nul: && GOTO check

in the hourly one.
Last edited by gluepack on 2015-10-16 09:49; edited 1 time in total

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: Recognise WinSCP is running

How do you schedule WinSCP run? Using Windows Scheduler? It allows you to prevent parallel runs.

Reply with quote

gluepack
Donor

As I said in my first post, my weather software (CumulusMX) invokes a user specified "program" at user specified intervals (i.e. in my case, at every 15 seconds and hourly). I chose to specify a vbs in each case that calls a batch file that, in turn, invokes WinSCP.

Reply with quote

Advertisement

You can post new topics in this forum