Automatically Run a Matlab Script
显示 更早的评论
I have a script that I want to run automatically, every 5 seconds. How could I set this up so that it runs in an unattended manner?
回答(1 个)
the cyclist
2020-3-3
0 个投票
9 个评论
fahd Belmajdoub
2020-3-3
the cyclist
2020-3-3
Oh, sorry. I should have clicked through to link they suggested. But I think what you want in Windows is the Task Scheduler.
To my knowledge, there is no task-scheduling ability that is fully internal to MATLAB.
fahd Belmajdoub
2020-3-3
Steven Lord
2020-3-3
I'm not completely certain since I haven't used it myself, but if you're not already aware there is an OPC Toolbox that may be of use to you. The "Data Access" section may describe functions and functionality that would be useful to you.
fahd Belmajdoub
2020-3-5
the cyclist
2020-3-5
The page I linked has a section entitled "How to create an advanced task ...".
It looks to me that #21 in that section describes how to repeat the task at higher frequency. (The internet suggested the same to me.)
I don't know if you can go down all the way to 5 seconds, though.
fahd Belmajdoub
2020-3-5
Steven Lord
2020-3-5
Do you need to run the script from the beginning every five seconds, or would running a script that loops indefinitely and polls for data to process every five seconds be sufficient?
fahd Belmajdoub
2020-3-5
编辑:fahd Belmajdoub
2020-3-5
类别
在 帮助中心 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!