When does the "After print job completes" script run?

Does the "After print job completes" gcode script run when a print job is cancelled or only when the print completes normally?

Thanks.

Here is the documentation
https://docs.octoprint.org/en/master/features/gcode_scripts.html