Command window output of still running task
Ältere Kommentare anzeigen
Hello,
does anyone whether there is a way to get the command window output of a task while it is still running?
If not, is there another built-in way of monitoring running tasks (besides the state?)?
Thanks,
Pieter
Akzeptierte Antwort
Weitere Antworten (2)
Thomas Ibbotson
am 12 Sep. 2012
2 Stimmen
Hi Pieter,
Starting in R2012b it is now possible to get the diary output of a task while it is still running. See http://www.mathworks.com/help/distcomp/release-notes.html.
Cheers, Tom
2 Kommentare
Xinyi Shen
am 27 Mai 2014
nobody explains how to use it. Therefore, there's still no way of doing so.
Thomas Ibbotson
am 28 Mai 2014
Here are some examples of how you might do this:
If you are using a batch job to run your task, then you can use the diary() function passing in the job while it is still running e.g.
job = batch('myScript');
diary(job)
If you are using jobs and tasks, you must set the CaptureDiary flag on the task to true, and then query the Diary property of the task e.g.
myCluster = parcluster;
job = createJob(myCluster);
task = createTask(job, @myFunction, 0, {}, 'CaptureDiary', true);
submit(job);
task.Diary
Pieter van den Berg
am 9 Sep. 2011
0 Stimmen
Kategorien
Mehr zu Job and Task Creation finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!