cancel
Showing results for 
Search instead for 
Did you mean: 

XMC CLI Task - sleep X seconds

XMC CLI Task - sleep X seconds

M_Nees
Contributor III

using XMC execute CLI commands …

 

searching for a command which makes a pause between 2 commands like:

 

show port X error no-refresh

pause 10

show port X error no-refresh

 

(sleep X or time.sleep X from XMC scripting does not work!)

 

Any ideas ?

1 ACCEPTED SOLUTION

StephanH
Valued Contributor III

Hello Matthias, 

you can't switch to TCL in CLI Command, that's correct. As far as I know CLI Command is a plain command input option without an intepreter, therefore you have to switch to task an TCL.

But as I wrote in difference to python no further code is necessary (only three lines from your example) therefore the code part is not realy complexe only the menus to start a script and select an name and usergroup is more complexe.

Regards Stephan

View solution in original post

7 REPLIES 7

OscarK
Extreme Employee

Hi Matthias, the set var wait command will just take 10 seconds (10000 msec) and then XMC sees the prompt and continues. 

I think it will work as long as the wait is not longer than XMC has defined its timeout.

 

If you need more sophisticated tasks in XMC use a python script instead of the command CLI script.

M_Nees
Contributor III

Hi Oskar,

that’s a good idea but only works with EXOS.

I am looking for a pause command within XMC cli task.

 

BR,

Matthias

OscarK
Extreme Employee

enable cli scripting

show port x error no-refresh

set var wait $TCL(after 10000)

show port x error no-refresh

 

Did not test it with XMC but it is working on EXOS.

 

GTM-P2G8KFN