This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

How to use NCM run command (such as yes, no, ...) to answer router's question?

I have a problem to use NCM run command (such as yes, no, ...) to answer router's question? I would like to sent command (green character in picture) to router.

config.jpg

thank you

  • Were you ever able to figure this out?  We have the same need.

  • Hi John Spanitz,

    Simply put the "answers" as commands in the correct order. You may also consider adding a delay if NCM sends the commands too fast.

    Regards,

    Jiri

  • This stuff is super hard to find and some of it is really buried in the docs.  That being said, even knowing the commands, it's hard to get it working.

    I've added the delay command to my script so it now looks like:

    {

      CLI

      {

         request system storage cleanup

         ${Delay:5}

         y

      }

    }

    And it results in this error:

    Validation Failed: An error occurred during script parsing. Position: Line 24, Character 3 Error message: no viable alternative at input '}' Please check script syntax.

    Line 24 is the y

    Per the Admin Guide (page 91):

         You can specify delay inside script in seconds– time NCM wait before

         sending next command:${Delay:20}  - wait 20 seconds before sending

         next command. So a script that includes the delay looks like this:

         {Command 1}

         ${Delay:20}

         {Command 2}