Hi Kendall, there is currently no way to do this using BaseX itself. But I also don’t think that should be the job of BaseX. Instead you can write a servlet and deploy it using Tomcat which runs some Java application, e.g. which could trigger some BaseXX command. See http://crunchify.com/how-to-run-java-program-automatically-on-tomcat-startup/ for an example how to do this.
Cheers Dirk Senacor Technologies Aktiengesellschaft - Sitz: Eschborn - Amtsgericht Frankfurt am Main - Reg.-Nr.: HRB 105546 Vorstand: Matthias Tomann, Marcus Purzer - Aufsichtsratsvorsitzender: Daniel Grözinger Von: basex-talk-boun...@mailman.uni-konstanz.de [mailto:basex-talk-boun...@mailman.uni-konstanz.de] Im Auftrag von Kendall Shaw Gesendet: Montag, 28. August 2017 06:46 An: BaseX <basex-talk@mailman.uni-konstanz.de> Betreff: [basex-talk] Startup hooks or persisting jobs Am I missing an existing way to run xquery at startup (basex web service running under tomcat)? I have jobs that I schedule, but I have to schedule them again if basex is shutdown. I can test for basex being started outside of basex and then execute queries, but if there is already a way to do this within basex, I would rather do that. Kendall