AE 12.1.1
AE 12.3x
Root Cause was the Attribute "Generate at Runtime" which was not set in an old migrated Template from previous Version.
The recommendation is to use recurring execution instead of a script that loops endlessly.
https://docs.automic.com/documentation/webhelp/english/AWA/12.1/DOCU/12.1/AWA%20Guides/help.htm#AWA/Executions/obj_ExecutingRecursive.htm
Link for 12.3
https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/12.3/Automic%20Automation%20Guides/help.htm#AWA/Executions/obj_ExecutingRecursive.htm
either execute every X or execute after previous run ends +X
Creating infinite loops by design is not advised.