- I know we can have one profile run after another profile using Execute Command or Script before/after.... If I have two profiles both set to run every 30 minutes, sometimes one profile will take longer. So how can I tell the 2nd profile to pause/wait until the first profile is done running.
- In Linux, how can I have it monitor files/folders for changes and run after 30 seconds, instead of running on set schedule?
Configure a profile to run on schedule but wait if another profile is running, and folder monitoring in Linux
-
- Posts: 140
- Joined: Sun Nov 20, 2022 5:11 am
Configure a profile to run on schedule but wait if another profile is running, and folder monitoring in Linux
I have two questions.
Re: Configure a profile to run on schedule but wait if another profile is running, and folder monitoring in Linux
Hello,
please see the "OnCanRunProfile Sample Script" on our PascalScript page:
https://www.syncovery.com/pascalscript/
Folder Monitoring is not available in the Linux version of Syncovery because Linux does not provide a suitable API for recursive monitoring.
There's only non-recursive, and that's not great. I may be able to find a solution some time in the future.
please see the "OnCanRunProfile Sample Script" on our PascalScript page:
https://www.syncovery.com/pascalscript/
Folder Monitoring is not available in the Linux version of Syncovery because Linux does not provide a suitable API for recursive monitoring.
There's only non-recursive, and that's not great. I may be able to find a solution some time in the future.
-
- Posts: 140
- Joined: Sun Nov 20, 2022 5:11 am
Re: Configure a profile to run on schedule but wait if another profile is running, and folder monitoring in Linux
Got it. Thank you.tobias wrote: Wed Feb 19, 2025 8:35 pm Hello,
please see the "OnCanRunProfile Sample Script" on our PascalScript page:
https://www.syncovery.com/pascalscript/
Folder Monitoring is not available in the Linux version of Syncovery because Linux does not provide a suitable API for recursive monitoring.
There's only non-recursive, and that's not great. I may be able to find a solution some time in the future.
If I have 4 profiles, and I don't want P1/P2 to run if P2/P1 is running, and/or P3/P4 to run if P4/P3 is running, then would this script work:
Code: Select all
const p1='Profile Name 1';
p2='Profile Name 2';
p3='Profile Name 3';
p4='Profile Name 4';
function OnCanRunProfile(const ProfileName:UnicodeString; var PostponeBySeconds:Integer):Boolean;
begin
if ProfileName=p1 then
Result:=not ProfileRunning(p2)
else
if ProfileName=p2 then
Result:=not ProfileRunning(p1)
else
if ProfileName=p3 then
Result:=not ProfileRunning(p4)
else
if ProfileName=p4 then
Result:=not ProfileRunning(p3)
else
Result:=true;
if not Result then
PostponeBySeconds:=60;
end;
Re: Configure a profile to run on schedule but wait if another profile is running, and folder monitoring in Linux
Hi,
yes the script looks great!
The only limitation with PascalScripts is that they don't run under ARM64 CPUs. I hope I can implement the CPU specific code for ARM64 sometime this year.
yes the script looks great!
The only limitation with PascalScripts is that they don't run under ARM64 CPUs. I hope I can implement the CPU specific code for ARM64 sometime this year.
-
- Posts: 140
- Joined: Sun Nov 20, 2022 5:11 am
Re: Configure a profile to run on schedule but wait if another profile is running, and folder monitoring in Linux
Out of curiosity, will the Maximum simultaneously running jobs (profiles): setting work as I'm thinking in that only one profile will run and other profiles will wait until it is done before starting?
Meaning, if I set this to 1 then I wouldn't need the script, right?
Meaning, if I set this to 1 then I wouldn't need the script, right?
Re: Configure a profile to run on schedule but wait if another profile is running, and folder monitoring in Linux
Hello,
yes, if you set the maximum simultaneous jobs to 1, then you won't need the script.
But the functionality is slightly different, as the script would allow profiles 1 and 3 to run together, as well as 2 and 4 etc.
yes, if you set the maximum simultaneous jobs to 1, then you won't need the script.
But the functionality is slightly different, as the script would allow profiles 1 and 3 to run together, as well as 2 and 4 etc.