Set vlan egress at interface up


Im having issues with setting vlan egress priority. the command via console works well this is the command

ip link set eth1.20 type vlan egress 0:3

But im trying to set it at boot on local startup after sleep 60 but doesnt work .
and the other issue its when the wan interface goes down i need to set it up again manually.
How i can set it up automatically with a script?

try with adding it to Firewall - Custom Rules (LuCI) since it the fw script provides awareness of changes in ifaces

doesnt work in custom rules i tried several commands and only works via terminal