- Regardless of whether the finish.m script is included in the shutdown files or not, it still runs before any of the project shutdown tasks begin.
- If the finish.m script has been added as a Shutdown file, it runs twice- first, when the exit command is executed and next, when the shutdown tasks run in order.
Which runs first, a project's shutdown task or the finish script?
조회 수: 3 (최근 30일)
이전 댓글 표시
On the one hand there's project shutdown tasks: https://www.mathworks.com/help/matlab/matlab_prog/automate-startup-and-shutdown-tasks.html
On the other hand there's the MATLAB finish script: https://www.mathworks.com/help/matlab/ref/finish.html
In testing it looks like the finish script runs first, then MATLAB asks if I want to save or discard any unsaved changes, and then the project shutdown task runs. What I'd like to know is whether that order is deterministic and guaranteed?
댓글 수: 0
답변 (1개)
Varun
2023년 2월 22일
편집: Varun
2023년 2월 22일
Hello!
Your testing is correct. The finish.m script indeed runs first and then, the project shutdown tasks run in the order they’ve been mentioned in the Manage Project Startup and Shutdown dialog box.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Software Development Tools에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!