Which runs first, a project's shutdown task or the finish script?

1 回表示 (過去 30 日間)
Nickolai Belakovski
Nickolai Belakovski 2022 年 10 月 21 日
編集済み: Varun 2023 年 2 月 22 日
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?

回答 (1 件)

Varun
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.
  • 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.

カテゴリ

Help Center および File ExchangeProject File Management についてさらに検索

タグ

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by