running a profile on conditions
running a profile on conditions
Is it possible to have a profile run only if another specific one is not running?
Re: running a profile on conditions
Thank you for the quick response.
This is the code I've added to the Global PascalScript via the Program Settings dialog, tab sheet Advanced
const p1='Daily Backup Tornado-X\UserData--Wombat';
p2='30-min Backup C-UserData--X';
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
Result:=true;
if not Result then
PostponeBySeconds:=60;
end;
Unfortunately I get an error reported by my profiles "Could not compile the Pascal script in this profile. [Error} (2:1): Syntax error"
This is the code I've added to the Global PascalScript via the Program Settings dialog, tab sheet Advanced
const p1='Daily Backup Tornado-X\UserData--Wombat';
p2='30-min Backup C-UserData--X';
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
Result:=true;
if not Result then
PostponeBySeconds:=60;
end;
Unfortunately I get an error reported by my profiles "Could not compile the Pascal script in this profile. [Error} (2:1): Syntax error"
Re: running a profile on conditions
Maybe you need to update Syncovery, or you have pasted some invalid character.
Please try replacing it with this script:
Please try replacing it with this script:
Code: Select all
const p1='Daily Backup Tornado-X\UserData--Wombat';
p2='30-min Backup C-UserData--X';
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
Result:=true;
if not Result then
PostponeBySeconds:=60;
end;
Re: running a profile on conditions
I've upgraded to the latest version and copy/pasted your code and it's all working ok now.
Thank you.
Thank you.