Basic Examples 
(2)
 

Evaluate an expression when the Wolfram Language kernel session is terminated:
In[4]:=
[◼]
RunOnQuit
[Print["Bye!"]]
Out[4]=
Success
✓
Message: Handler added successfully
Tag: RunOnQuit

In[5]:=
Quit[]
Bye!
———
Add multiple pieces of code:
In[4]:=
[◼]
RunOnQuit
[Print["first"]]
Out[4]=
Success
✓
Message: Handler added successfully
Tag: RunOnQuit

In[5]:=
[◼]
RunOnQuit
[Print["second"]]
Out[5]=
Success
✓
Message: Handler added successfully
Tag: RunOnQuit

In[6]:=
Quit[]
second
first

Scope 
(3)
 


Applications 
(4)
 


Possible Issues 
(2)
 
