IPSEC tunnel issues - SAs need flushing from time to time

Dear All,

I would like to run this script but it doesn’t work somehow, could you please help me what may the problem? I didn’t get any messages inside log.

Currently I’m running on 6.39rc40

In the meantime I recognized that I’m able to run it (without sa-type=all just simple /ip ipsec installed-sa flush) via terminal but via scheduler doesn’t work (run count increasing but there is no massages inside log)

I also tried a simplified version but no change, it is working only from terminal

:if ([/ping 192.168.15.254 count=4]<3) do={
/ip ipsec installed-sa flush;
:log info “IPSEC tunnel is down: Flushing Installed SA !!!”
} else={
:log info “IPSEC tunnel is OK !”
}



Thank you for your help in advance

B.