I have PPPoE set up on my mikrotik but when it adds the simple queue it adds it at the bottom of the list. Is there a way to change where it will add it?
I wrote a script to move it to the top of the queue list but I can’t get it to work. Can anyone see any problems with this script.
Thanks
:foreach I in=[/queue simple find dynamic=yes] do={
/queue simple move $I 0
:log info ("moved " . $I)
}
If I manually move the queue to somewhere near the top of the list of queues, I have found that no matter what I put into this script for the location to move it to, It will move the Dynamic queue back to the bottom of the list queues.
:foreach I in=[/queue simple find dynamic=yes] do={
/queue simple move $I 0
:log info ("moved " . $I)
}
Can anyone tell me why this isn’t working. Everything I have tried doesn’t make a difference. The scrip above will only move the script to the bottom of the list of queues. I wan’t it to move it to the top of the list of queues. What am I doing wrong here?
You have me confused then. The 0 in my script is the position where I am trying to move the queue to. So how would I use the find statement to find the first location. Do you have any suggestions that would work better for me on this script?
I really need something that will move the dynamic queues to the top of the list.
This has been told many times before:
DO NOT USE ITEM NUMBERS IN SCRIPTS!
Code:
:foreach I in=[/queue simple find dynamic=yes] do={
/queue simple move $I *1
:log info ("moved " . $I)
}
Instead of *1 which represents internal console number of the 1st item, you should use find statement.
I have this figured out now. Thank you for your help Eugene.
What I did was make a Queue that I disabled at the top of the list with a special name. I then used that to find the location of the top of the list and move the Dynamic Queues above that.
Here is the working script.
:foreach I in=[/queue simple find dynamic=yes] do={
:log info ("Moved queue " . $I)
/queue simple move $I [/queue simple find name=“Static Queues - Do Not Remove”]
}