필터 지우기
필터 지우기

I just want to run my script within a certain time periodically. That's it all ....

조회 수: 24 (최근 30일)
Hi everyone, Nice to meet ya
I actually have a problem in my GUI design. My superior assign me to create a time scheduler script to create data periodically.
In the above GUI design, i want my toggle button of "Start FMI K-Indices Automation" do some work for a certain time. If the "Set Auto-Update Timer" was selected to "Per 3 Hour", so it meant my Script will run for every 00:00 AM/PM, 03:00 AM, 06:00 AM, ..... 18.00 PM, 21.00 PM, and 00 AM/PM again.
As far as i know, i just modified this script :
function [myTimer] = TimerScrip
myTimer = timer('Name','MyTimer', ...
'Period',5, ...
'StartDelay',0, ...
'TasksToExecute',inf, ...
'ExecutionMode','fixedSpacing', ...
'TimerFcn',@myTimerCallback);
start(myTimer);
function myTimerCallback(~, ~)
fprintf('hello!\n'); % This is actually filled by my actual script (FMI K-Indices) which ll create my
% data automatically for every period (00:00 AM/PM, 03:00 AM, 06:00 AM,
% ..... 18.00 PM, 21.00 PM, and 00 AM/PM)
So if everyone here, know more about the script or maybe another powerful script to run my script periodically (hopefully without "Task Scheduler") and would lend me a hand to do so, I will be happy and grateful to receive it as my solving problem... Thank youu very muchh everyoneee...
  댓글 수: 5
Tyann Hardyn
Tyann Hardyn 2024년 2월 23일
편집: Tyann Hardyn 2024년 2월 23일
@Stephen23 I have not required time precision (plus minus second or minute), Sir... Please help me, Sir .....
Tharikaa Ramesh Kumar
Tharikaa Ramesh Kumar 2024년 6월 11일
Do you run time-consuming tasks on MATLAB and Simulink? Do you wish you could schedule them and run them in the background, unattended? How do you solve this question today?
MATLAB Product team is very interested to talk to you and learn from your experience. Please participate in this brief survey (6 questions).

댓글을 달려면 로그인하십시오.

채택된 답변

Stephen23
Stephen23 2024년 2월 22일
편집: Stephen23 2024년 2월 22일
Use
This is the function that lets you specify an absolute time for firing the timer.

추가 답변 (1개)

Tharikaa Ramesh Kumar
Tharikaa Ramesh Kumar 2024년 6월 11일
Do you run time-consuming tasks on MATLAB and Simulink? Do you wish you could schedule them and run them in the background, unattended? How do you solve this question today?
MATLAB Product team is very interested to talk to you and learn from your experience. Please participate in this brief survey (6 questions).

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by