What if last sync is not succesfull?

Advertisement

dammyware
Joined:
Posts:
3
Location:
Athens

What if last sync is not succesfull?

I have an automated proccess using windows schedulers running in 3 steps

1. Export files from Software
2. Transfer those files to a given FTP
3. Move those files to archive so that they don't sync again based on if the transfer scheduler is successful. This is done so that the files in the destination are moved to another folder which i don't have access and i really don't want to even think what will happen if i sync those files again.

Now all of the above works flowless except from one condition. Client internet connection is not good due to it's server location and sometimes disconnect before file transfer so files are moved to archive and will not sync again. I thought that using an XML on the archive scheduler to run only if the previous scheduler is sucessful was going to work but obviously scheduler does not know the result of winscp.

Is there any other work arround in an automated way? Even if it means changes in the stracture of this process

Reply with quote

Advertisement

dammyware
Joined:
Posts:
3
Location:
Athens

Hello Martin, thanks for your reply.

I use a batch file with the following command:

move C:\sync\folder\*.* C:\archive\folder.

This batch is excecuted conditionally with windows scheduler with the following xml code:

<QueryList>
<Query Id="0" Path="Microsoft-Windows-TaskScheduler/Operational">
<Select Path="Microsoft-Windows-TaskScheduler/Operational">*[EventData[@Name='TaskSuccessEvent'][Data[@Name='TaskName']='\Taskname']]</Select>
</Query>
</QueryList>

Is any way to include the return code (0 or 1) so i can execute conditionally the move command when i run the batch file?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
29,303
Location:
Prague, Czechia

dammyware wrote:

Is any way to include the return code (0 or 1) so i can execute conditionally the move command when i run the batch file?
WinSCP does return 0/1 exit code to indicate its result. As the FAQ linked in my previous post shows. You still didn't show us what are you doing to process the exit code.

Reply with quote

Advertisement

You can post new topics in this forum