15 Oct
2018
15 Oct
'18
4:59 p.m.
Hi Marco,
I tried to reproduce the problem:
1. I downloaded http://files.basex.org/releases/9.0.2/BaseX902.zip
2. I unzipped the archive
3. I added a jobs.xml file in the basex/data directory:
<jobs>
<job>admin:write-log('!')</job>
</jobs>
4. I started basexhttp
5. As expected, the log entry is listed in the DBA logs panel.
6. jobs:services() returns <job>admin:write-log('!')</job>
Could you do the same and report back to us what you did differently?
Thanks in advance
Christian
> Hi Christian,
> thank you as usual for your attention.
> With standalone I mean basexhttp which is what we usually do. This time
> we have requirement for running inside tomcat...
> The jobs.xml file looks like:
>
> <jobs>
> <job id="startup">if (db:exists('onedb')) then () else
> db:create('ondedb')</job>
> </jobs>
>
> but we have also tried with:
>
> <jobs>
> <job id="startup">admin:write-log(current-dateTime())</job>
> </jobs>
>
> which presents the exact same issues: basexhttp runs ok but
> jobs:services() doesn't list them whereas tomcat doesn't run the scripts
> but services are listed.
> Thank you again,
> Marco.
>
> On 15/10/2018 15:25, Christian Grün wrote:
> > Hi Marco,
> >
> > I see your question didn’t get an answer yet. Maybe we can first try
> > to find out what Jetty does (or does not):
> >
> >> When running standalone with Jetty, the scripts are executed even if, in
> >> this case, we are getting empty results when running jobs:services() in
> >> the DBA after startup.
> > Some questions back:
> > 1. By 'standalone', do you mean that you are running 'basexhttp', or
> > do you run Jetty and deploy BaseX as WAR file?
> > 2. How does the jobs.xml file in the database directory look like?
> >
> > Cheers,
> > Christian
>
>