Save project on system restart/shutdown (Windows)

I have a TD project (v2018.26750) that calls ‘project.save’ through the onExit method of an Execute DAT— this works whenever I close the TD window myself (click the close button or hit File>Quit).

However, it seems that this does not get called when the system (Win 10) is simply shutdown or rebooted (through an external service or simply by going to Power>Reboot).

How do I get my project to recognize this shutdown/reboot process and save itself :smiley:

Thanks
Roberto