help-octave
[Top][All Lists]

## Re: Run script/function at regular intervals

 From: Andy Buckle Subject: Re: Run script/function at regular intervals Date: Wed, 1 May 2013 12:41:58 +0100

On 1 May 2013 11:01, Arnaud Miege wrote:

On 1 May 2013 10:55, Andy Buckle wrote:

On 1 May 2013 10:45, c. wrote:

It's been more than 10 years since I used a windows machine last time,
so I'm not really sure I can help much  here.
If you can't make executable scripts on windows, you may probably work
around the issue by scheduling a task as

octave --eval 'source D:path\to\script\your_script_name.m'

octave --eval 'your_script_name'

this way the executable to run is octave itself, while the script is passed as
a command line option.

HTH,
c.

Execute a command like c. said.

Finding scheduled tasks is different in XP and Vista/7. (I have not used 8).

There is also a DOS interface: type the following in a DOS prompt to learn more

--
/* andy buckle */

Thank you both. I have tried this but here is the error message I get in a DOS command window when I try:

C:\Documents and Settings\ajpm>D:\Octave-3.6.4\Octave3.6.4_gcc4.6.2\bin\octave.e
xe --eval 'source L:\MatlabModels\ambr250\Royston_weather.m'
GNU Octave, version 3.6.4
Copyright (C) 2013 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type warranty'.

Octave was configured for "i686-pc-mingw32".

Please contribute if you find this software useful.

Read http://www.octave.org/bugs.html to learn how to submit bug reports.

For information about changes from previous versions, type news'.

warning: gmsh does not seem to be present some functionalities will be disabled
warning: dx does not seem to be present some functionalities will be disabled
warning: function D:\Octave-3.6.4\Octave3.6.4_gcc4.6.2\share\octave\packages\sta
tistics-1.2.0\fstat.m shadows a core library function
error: unterminated string constant
parse error:

>>> 'source

I have also tried without the "source" argument, just passing the path to the script in single quotes, and although that does not produce any error, it doesn't seem to do anything either.

Arnaud

Does this work?

C:\Documents and Settings\ajpm>D:\Octave-3.6.4\Octave3.6.4_gcc4.6.2\bin\octave.e
xe --eval 'cd L:\MatlabModels\ambr250\ ; Royston_weather'

--
/* andy buckle */