Filter löschen
Filter löschen

How do I wait for a license to become available?

14 Ansichten (letzte 30 Tage)
I am on a network license with a limited number of licenses. If all the licenses for a particular product are checked out, and I try to use a command from that product, the command will fail. I would rather wait until the license is available before continuing my program.

Akzeptierte Antwort

MathWorks Support Team
MathWorks Support Team am 28 Jun. 2010
You can use the LICENSE command to stall until the license you need is available. Suppose you want to wait until a license of Real-Time Workshop is available.
license('checkout','Real-Time_Workshop')
will return either 1 or 0 depending on whether the RTW license is available or not. You have a block of code such as
while (~license('checkout','Real-Time_Workshop'))
% do nothing and wait indefinitely
end
% license checkout is successful, continue with rest of program
that will wait until the license is available.

Weitere Antworten (0)

Kategorien

Mehr zu Manage Products finden Sie in Help Center und File Exchange

Produkte


Version

R2009a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by