• Support
  • Articles
  • Resources
  • Products

Any automated code to replace Mpause?

Moderator: boris

5 postsPage 1 of 1

Mokan
Newbie

Posts:
7
Joined: Mon Jun 19, 2017 2:14 am
by Mokan » Mon Jun 19, 2017 2:19 am


Above is an example of macro to collect logs from a router. Any idea how to code to make sure that the a command runs completely from one command to another command without using "mpause". Any idea how do i automate it??
Trevor
Guru

Posts:
485
Joined: Wed Jul 26, 2006 8:47 am
by Trevor » Tue Jun 20, 2017 11:40 am
Have you tried just removing the "mpause" lines? If so what does not work when you do?
Mokan
Newbie

Posts:
7
Joined: Mon Jun 19, 2017 2:14 am
by Mokan » Wed Jun 21, 2017 1:19 am
ave you tried just removing the "mpause" lines? If so what does not work when you do?

The reason i included mpause is that to allow the command before to run completely. Is there any way besides using mpause to get the commands completely executed before jumping into another command while running through macro.
Trevor
Guru

Posts:
485
Joined: Wed Jul 26, 2006 8:47 am
by Trevor » Thu Jun 22, 2017 9:00 am
But you are waiting for the command prompt after the command so therefore the mpause should not be needed i.e. the command prompt should only appear after the command has completed. Hence my previous question.

The wait for command prompt should really have a timeout and detect when a timeout occurs. I would make it a function like this:

And then instead of use

Then if you do need a delay you have just one place to put in (in the function).
Mokan
Newbie

Posts:
7
Joined: Mon Jun 19, 2017 2:14 am
by Mokan » Thu Jun 29, 2017 5:50 am


Above are the new set of codes. My concern is that whenever i remove mpause from the function the length of logs collected are shorter which highlights some commands needed timeout to fully completed. Thus if im using this function on other routers which needed longer pause time how do i overcome it. Is there any commands would help to fix this problem without using mpause.
Display posts from previous:
Sort by:

5 postsPage 1 of 1

Users browsing this forum: No registered users
cron