Moving Dynamic queues in Hotspot

Ok I know the issue of dynamic queues being created above static queues in hotspot has been addressed, and I have a very short simple script that fixes that, but the problem is you must run it from terminal to make it work. If you create a script and then set up a schedule for it, the log files show the queues being moved but they dont actually move. I am using the same line of code :

/queue simple move [find where !dynamic] 0

. So any ideas why it works from cli but not from a script?

because the syntax (for 6.7+) are wrong

ok but it also does not work 5.14 or 5.22 as a script but works on all 3 versions from terminal.

OK, I fix the answer: Because the syntax are wrong FOR ALL SCRIPT VERSION OF ROUTEROS, and also for the terrmianl version, if is not used (for terminal version only) on previous command “/queue simple print” or similar.

The right syntax are:

/queue simple move [/queue simple find where comment=“move this”] destination=[/queue simple find where comment=“before that”]

And ID is not the 0, 1, 2 … X of the print command, but internal id of the queue.

so to run it as a script, the syntax is different than when I run it in terminal? by the id you mean queue1, queue2 etc.? and how does that take into account the names of my static queues that need to be at the top of the list to work correctly?

Exactly:

/queue simple move [/queue simple find where comment=“move this”] destination=[/queue simple find where comment=“before that”]

/queue simple move [/queue simple find where name=“myqueue”] destination=[/queue simple find where name=“hs-”]

For move more than one you must use foreach function, etc.

I not have ready example for that, but see all my post :wink: there are some good examples (I think).

I still dont understand why my code works from terminal then

because “0” not exist on script side, but only on terminal / print side.

ok now that makes sense. Seems like my naming scheme needs to be more consistent then for any type of script to work.

Use this on your script:

/queue simple move [/queue simple find where dynamic=no] destination=[/queue simple find where name=“hs-”]

You must change the hs- name of your “0” queue.

But that name will change with each pass. Is there a way to move it to the top without using the name? or do I need to capture the name into a variable and pass it with each iteration?

Try this: dynamically find the first queue each time is runned, without know the name or other parameters :wink:

/queue simple move [/queue simple find where dynamic=no] destination=([/queue simple find]->0);

and obviously is the exact traduction on script-side of “/queue simple move [find where !dynamic] 0” :laughing:

rextended you are the man!!! that worked!! thank you so much for your assistance.

Simply ask on the forum.
If someone can help you, usually do that.