|
From: | Andy Buckle |
Subject: | Re: Run script/function at regular intervals |
Date: | Wed, 1 May 2013 10:55:03 +0100 |
It's been more than 10 years since I used a windows machine last time,
On 1 May 2013, at 10:18, Arnaud Miege <address@hidden> wrote:
>
> On 30 April 2013 17:42, c. <address@hidden> wrote:
>
> 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.
>
> I have tried adding the shebang with the following line at the beginning of my script:
> #! D:\Octave-3.6.4\Octave3.6.4_gcc4.6.2\bin\octave.exe -qf
>
> How do I then turn the script into an executable on Windows? All the examples I could find online seem to be related to Unix rather than Windows.
>
> As far as scheduling is concerned, it looks like the best option in Windows is to use Scheduled Tasks:
> http://support.microsoft.com/kb/308569
>
> but I need an executable before I get to that.
>
> Thanks,
>
> Arnaud
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'
or if your script is somewhere in Octave's default loadpath, simply
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.
[Prev in Thread] | Current Thread | [Next in Thread] |