Job option to execute script before

English Support for Syncovery on Windows.
Post Reply
katie83
Posts: 4
Joined: Wed Nov 17, 2021 3:25 pm

Job option to execute script before

Post by katie83 »

I have a task where the Sync Operation Mode is Move Files to Destination. Before the job runs, I need to move the files that are currently in the Destination directory to a Save directory. So I have a PS script configured to execute using the "BEFORE" option before the task moves the files. I put the ! in front of the before line so that the job will wait for it to finish before running the move task. When the schedule kicks off the job, sometimes it is moving the files first and then running the "BEFORE" script. It is not running the "BEFORE" script before. Has anyone seen this behavior before? Anyone know how to solve this?

tobias
Posts: 1604
Joined: Tue Mar 31, 2020 7:37 pm

Re: Job option to execute script before

Post by tobias »

Hello,
I think the problem must be a little bit different. You need to study the log files to find it. The log will show when the script is executed.

katie83
Posts: 4
Joined: Wed Nov 17, 2021 3:25 pm

Re: Job option to execute script before

Post by katie83 »

There is nothing in the log that shows why it does this sometimes. I compared a log that worked as configured with a log that did not. Nothing different in it except that when it moved the files, it overwrote the destination. Which is not what I want it to do, hence why I have the BEFORE job to move the files in the destination out before the task moves the files.

Can the *060* be used with the ! in front of the BEFORE script? So that it will wait until the process finishes plus wait an additional 60 seconds? Like this?

!*060*C:\Scripts\Syncovery\script_runner.vbs "E:\Scripts\Syncovery\SyncoveryMoveFiles.ps1"

katie83
Posts: 4
Joined: Wed Nov 17, 2021 3:25 pm

Re: Job option to execute script before

Post by katie83 »

I did successfully test the !*060* in front so I will try that and see if this fixes the issue.

Post Reply