Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Automatic Execution

Subject: Automatic Execution

From: Matt

Date: 11 Aug, 2010 15:25:22

Message: 1 of 9

Hi, All --

I have an M-file that processes data from a DAQ system, generates an ASCII file, and then FTP's it to a web server. I would like to automate this process such that it occurs several times per day. I have been unable to find a MATLAB command that will do this, so I am thinking of using Windows Task Scheduler. When I set up the scheduler and point to the M-file, it simply opens MATLAB, but does not execute the M-file. Can anybody provide any insight here?

Thanks a bunch.

Matt

Subject: Automatic Execution

From: Sean

Date: 11 Aug, 2010 16:11:19

Message: 2 of 9

"Matt " <matt@email.com> wrote in message <i3ufd2$l5p$1@fred.mathworks.com>...
> Hi, All --
>
> I have an M-file that processes data from a DAQ system, generates an ASCII file, and then FTP's it to a web server. I would like to automate this process such that it occurs several times per day. I have been unable to find a MATLAB command that will do this, so I am thinking of using Windows Task Scheduler. When I set up the scheduler and point to the M-file, it simply opens MATLAB, but does not execute the M-file. Can anybody provide any insight here?
>
> Thanks a bunch.
>
> Matt

A few ideas:
-If you can leave MATLAB open: timers (doc timer)
-Deploy it and use task scheduler.

Subject: Automatic Execution

From: Matt

Date: 11 Aug, 2010 16:37:05

Message: 3 of 9

"Sean " <sean.dewolski@nospamplease.umit.maine.edu> wrote in message
> A few ideas:
> -If you can leave MATLAB open: timers (doc timer)
> -Deploy it and use task scheduler.

Sean -- thanks for the reply -- I follow your first suggestion, but not the second. Could you elaborate?

Subject: Automatic Execution

From: Andy

Date: 11 Aug, 2010 17:19:06

Message: 4 of 9

"Matt " <matt@email.com> wrote in message <i3ujjg$pgf$1@fred.mathworks.com>...
> "Sean " <sean.dewolski@nospamplease.umit.maine.edu> wrote in message
> > A few ideas:
> > -If you can leave MATLAB open: timers (doc timer)
> > -Deploy it and use task scheduler.
>
> Sean -- thanks for the reply -- I follow your first suggestion, but not the second. Could you elaborate?

The second suggestion is to use one of the available deployment tools (Compiler, Builder EX, Builder JA, etc.) to create a standalone application, which you would then use the Task Scheduler to run.

Subject: Automatic Execution

From: Steven_Lord

Date: 11 Aug, 2010 17:28:39

Message: 5 of 9



"Matt " <matt@email.com> wrote in message
news:i3ufd2$l5p$1@fred.mathworks.com...
> Hi, All --
>
> I have an M-file that processes data from a DAQ system, generates an ASCII
> file, and then FTP's it to a web server. I would like to automate this
> process such that it occurs several times per day. I have been unable to
> find a MATLAB command that will do this, so I am thinking of using Windows
> Task Scheduler. When I set up the scheduler and point to the M-file, it
> simply opens MATLAB, but does not execute the M-file. Can anybody provide
> any insight here?

Invoke MATLAB using the -r startup option in your scheduled task.

http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_env/f8-4994.html#bq24t0c

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: Automatic Execution

From: Matt

Date: 11 Aug, 2010 18:02:22

Message: 6 of 9

"Steven_Lord" <slord@mathworks.com> wrote in message <i3umk7$atb$1@fred.mathworks.com>...
>
> Invoke MATLAB using the -r startup option in your scheduled task.
>
> http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_env/f8-4994.html#bq24t0c
>
> --
> Steve Lord

Great idea -- I wasn't aware of that startup option. Thanks.

Subject: Automatic Execution

From: Matt

Date: 11 Aug, 2010 18:07:05

Message: 7 of 9

"Andy " <myfakeemailaddress@gmail.com> wrote in message
>
> The second suggestion is to use one of the available deployment tools (Compiler, Builder EX, Builder JA, etc.) to create a standalone application, which you would then use the Task Scheduler to run.

Thanks Andy -- are those tools included in MATLAB? I can't find them in docs.

Subject: Automatic Execution

From: Walter Roberson

Date: 11 Aug, 2010 18:13:02

Message: 8 of 9

Matt wrote:
> Hi, All --
>
> I have an M-file that processes data from a DAQ system, generates an
> ASCII file, and then FTP's it to a web server. I would like to automate
> this process such that it occurs several times per day. I have been
> unable to find a MATLAB command that will do this, so I am thinking of
> using Windows Task Scheduler. When I set up the scheduler and point to
> the M-file, it simply opens MATLAB, but does not execute the M-file. Can
> anybody provide any insight here?

Task schedule a BAT file that starts Matlab using a -r parameter.

Subject: Automatic Execution

From: Andy

Date: 11 Aug, 2010 18:26:09

Message: 9 of 9

"Matt " <matt@email.com> wrote in message <i3uos9$4bm$1@fred.mathworks.com>...
> "Andy " <myfakeemailaddress@gmail.com> wrote in message
> >
> > The second suggestion is to use one of the available deployment tools (Compiler, Builder EX, Builder JA, etc.) to create a standalone application, which you would then use the Task Scheduler to run.
>
> Thanks Andy -- are those tools included in MATLAB? I can't find them in docs.

No, they are toolboxes that you can purchase separately.

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us