"Keepuptodate" behaviours

Advertisement

Abdam
Joined:
Posts:
5

"Keepuptodate" behaviours

I have a server production server I want to keep all resources to a minimum and have file transfers at specific time called by scripts. What I do is start the "keepuptodate" script at a specific time and script it to stop the process at another time.

Unfortunately starting the "keepuptodate" script only monitors for changes in a directory, which IF one happens it then starts the transfers, but there are times where all the changes have been made already, but not always. This means that it doesn't start off a transfer because there aren't any changes being made after it starts.

I know I could use the "synchronize" command for that scenario, but it's not every time that the files are there waiting as some of the time there are more files that could be added to the directory after my script has started.

Does/can the "keepuptodate" command start with a "synchronize" to make sure the directory is up-to-date and then keep monitoring the directory for any further changes?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,392
Location:
Prague, Czechia

Re: "Keepuptodate" behaviours

I'm not sure I understand what you ask for/what your problem is. But to answer your explicit question:

Abdam wrote:

Does/can the "keepuptodate" command start with a "synchronize" to make sure the directory is up-to-date and then keep monitoring the directory for any further changes?
Not in scripting - in GUI it does (optionally) - in scripting you can do the same by explicitly running synchronize.

Reply with quote

Abdam
Joined:
Posts:
5

Re: "Keepuptodate" behaviours

martin wrote:

I'm not sure I understand what you ask for/what your problem is.

This was more a scenario I'm running so you can see if there's was a different way WINSCP would be used by you addressing the question was possibly the answer.

martin wrote:


Abdam wrote:

Does/can the "keepuptodate" command start with a "synchronize" to make sure the directory is up-to-date and then keep monitoring the directory for any further changes?
Not in scripting - in GUI it does (optionally) - in scripting you can do the same by explicitly running synchronize.

Does this mean if I start the script synchronize remote -delete -criteria=time D:\<Destination> /<source> on the destination server at 01:00 it would act like keepuptodate -delete D:\<Destination> /<source>, so if I added a file at 01:30 it would still be copied across? or would I have to write the script as:
option batch on
option confirm off

open ftps://<FTPUser>:<FTPPassword>@<FTPServer> -explicit -certificate="<Thumbprint>"
synchronize remote -delete -criteria=time D:\<Destination> /<source>
keepuptodate -delete D:\<Destination> /<source>

and run another script kill off the WINSCP.exe processes at the time I required?

Reply with quote

Advertisement

You can post new topics in this forum