Startup hooks or persisting jobs
Monday, 28 August 2017 · 4 messages · last reply 18 Sep 2017
KS
Kendall Shaw28 Aug 2017 06:45 #
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
KD
Kirsten, Dirk28 Aug 2017 21:21 #
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
Quoted text · basex-talk-bounces at mailman.uni-konstanz.de · 7 lines
Von: basex-talk-bounces at mailman.uni-konstanz.de [mailto:basex-talk-bounces at mailman.uni-konstanz.de] Im Auftrag von Kendall Shaw Gesendet: Montag, 28. August 2017 06:46 An: BaseX <basex-talk at 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
KS
Kendall Shaw28 Aug 2017 21:28 #
Thanks. I would think that being able to schedule jobs would fit nicely with having scheduled jobs persist after restart.
Kendall
Quoted text · Kirsten, Dirk · 17 lines
From: "Kirsten, Dirk" <Dirk.Kirsten at senacor.com> Date: Monday, August 28, 2017 at 12:21 PM To: Kendall Shaw <kendall.shaw at workday.com>, BaseX <basex-talk at mailman.uni-konstanz.de> Subject: AW: Startup hooks or persisting jobs 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/<https://urldefense.proofpoint.com/v2/url?u=http-3A__crunchify.com_how-2Dto-2Drun-2Djava-2Dprogram-2Dautomatically-2Don-2Dtomcat-2Dstartup_&d=DwMGaQ&c=DS6PUFBBr_KiLo7Sjt3ljp5jaW5k2i9ijVXllEdOozc&r=JgwnBEpN1c-DDmq-Up2QMq9rrGyfWK0KtSpT7dxRglA&m=gOpscG7vkDRSI_XslDmh4eqaDUWLl-AlYsKjjD9n7Rs&s=H3i0AH5LU5JYG_1guelBQPwLs9FgFlNKzT3qnkjQvbI&e=> 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-bounces at mailman.uni-konstanz.de [mailto:basex-talk-bounces at mailman.uni-konstanz.de] Im Auftrag von Kendall Shaw Gesendet: Montag, 28. August 2017 06:46 An: BaseX <basex-talk at 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
CG
Christian Grün18 Sep 2017 15:28 #
Hi Kendall,
Coincidentally, we had a similar discussion in our team. I have added a little issue; more feedback is welcome.
Cheers,
Christian
PS: Thanks everyone for keeping the mailing list alive!
[1] https://github.com/BaseXdb/basex/issues/1498
Quoted text · Kendall Shaw · 67 lines
On Mon, Aug 28, 2017 at 9:28 PM, Kendall Shaw <kendall.shaw at workday.com> wrote: > Thanks. I would think that being able to schedule jobs would fit nicely with > having scheduled jobs persist after restart. > > > > Kendall > > > > From: "Kirsten, Dirk" <Dirk.Kirsten at senacor.com> > Date: Monday, August 28, 2017 at 12:21 PM > To: Kendall Shaw <kendall.shaw at workday.com>, BaseX > <basex-talk at mailman.uni-konstanz.de> > Subject: AW: Startup hooks or persisting jobs > > > > 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-bounces at mailman.uni-konstanz.de > [mailto:basex-talk-bounces at mailman.uni-konstanz.de] Im Auftrag von Kendall > Shaw > Gesendet: Montag, 28. August 2017 06:46 > An: BaseX <basex-talk at 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 > >
Written for BaseX 8.6. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery