help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Run script/function at regular intervals


From: c.
Subject: Re: Run script/function at regular intervals
Date: Tue, 30 Apr 2013 18:42:47 +0200

On 30 Apr 2013, at 17:39, Arnaud Miege <address@hidden> wrote:

> Hi,
> 
> I have a script (although it could be easily turned into a function if need 
> be) that retrieves data from a website using urlread and saves (appends) it 
> to a CSV file and also a data file. I would like to run this script at 
> regular intervals, e.g. every hour, ideally in the background.
> 
> I have gone through the various timing functions in Octave, and the only one 
> that seems adequate for the job is sleep. Is there a better solution? While 
> Octave is "sleeping", does it mean I cannot do anything else unless I fire 
> another instance of Octave? Is there any way to run this in the background?
> 
> Any suggestions welcome,
> 
> Thanks,
> 
> Arnaud


I think the best solution for this is to make your script executable by adding 
the appropriate shebang:

http://www.gnu.org/software/octave/doc/interpreter/Executable-Octave-Programs.html

and then setup a cron job to run it at given intervals:

http://en.wikipedia.org/wiki/Cron

HTH,
c.

 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]