Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: publish function - Running matlab using crontab in Linux?
Date: Thu, 26 Jun 2008 19:14:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 50
Message-ID: <g40ppq$29l$1@fred.mathworks.com>
References: <g40nvq$96h$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1214507642 2357 172.30.248.35 (26 Jun 2008 19:14:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 26 Jun 2008 19:14:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869596
Xref: news.mathworks.com comp.soft-sys.matlab:476096



"Kristen Lessel" <drangelpsyche@yahoo.com> wrote in 
message <g40nvq$96h$1@fred.mathworks.com>...
> Hello,
> 
> I am using linux and have been attempting to set matlab 
up
> to automatically execute my code every few hours using
> crontab on Linux.  I am currently using the 'publish'
> function to capture the graph that is outputted in html
> form.  However, when using crontab, since there is no
> display selected, matlab gives a warning on startup in 
the
> command prompt:
> 
> Warning: No display specified.  You will not be able to
> display graphics on the screen.
> Warning: No window system found.  Java option 'MWT' 
ignored
> 
> And subsequently errors:
> 
> Error using ==> print at 310
> Error using ==> prepareui at 56
> Printing of uicontrols is not supported on this platform.
> Error in ==> print at 310
>     throw(ex);
> 
> Error in ==> snapnow>snapFigure at 349
>         print(f,printOptions{:},imgFileName);
> 
> Error in ==> snapnow>leavingCell at 106
>     snapFigure( ...
> 
> Error in ==> snapnow at 61
>     data = leavingCell(iCell,data);
> 
> Does anyone know any way around this?  I've tried messing
> with a few of the different publish options.. but so far
> none of them have worked.  Does anyone know a way around
> this?  Or if there is another way to automate capturing
> figure output?  Please help!  Thank you!!
> 
Kristen,

You could take a look at getframe (a built-in wrapper for 
capturescreen.dll). You could save the frames off to a 
file etc.

hth,
Scott