Code: Select all
:foreach item in=[/sys sch find] do={
:if ([/system scheduler get $item disabled] = true) do={
:local disAcc [/sys sch get $item name]
:log warning $disAcc
/ppp secret set $disAcc profile="EXPIRED"
}
}
:foreach item in=[/sys sch find] do={
:if ([/system scheduler get $item disabled] = true) do={
:local disAcc [/sys sch get $item name]
:log warning $disAcc
/ppp secret set $disAcc profile="EXPIRED"
}
}
/system scheduler :foreach item in=[find] do={ :if ([get $item disabled]) do={ :local disAcc [get $item name] :log warning $disAcc /ppp secret set $disAcc profile="EXPIRED" } }There can be 3 reason because do not work:
/ppp secret set $disAcc profile=[.. profile find where name="EXPIRED"]
/system scheduler
:foreach item in=[find] do={
:if ([get $item disabled]) do={
:local disAcc [get $item name]
/ppp secret
:local pppList [find]
:local pppSec [get $pppList name]
:log warning $pppSec
:if ([$disAcc] = [$pppSec]) do={
/ppp secret set $pppSec profile="EXPIRED"
} else={
:log warning "Match not found"
}
}
}
/system scheduler
:foreach item in=[find where disabled] do={
:local disAcc [get $item name]
/ppp secret
:foreach sname in=[find where name=$disAcc] do={
:log warning "Set $disAcc profile EXPIRED"
set $sname profile=([.. profile find where name="EXPIRED"]->0)
}
}