Hi Jan,
Finally some feedback to you as well:
Any Idea what's blocking the shutdown.bxs command script?
Interestingly, I can stop your first script with both the shutdown script and the XQuery expression (provided that I am running them from an interactive BaseX console; when calling "basex startup.bxs", the job will already by stopped as soon the BaseX Java process quits).
Which version of BaseX are you using? How exactly did you proceed to start the scripts?
Cheers, Christian