Job scheduler

Nicolas Souchon <[email protected]>
Newsgroups gmane.text.xml.exist
Message-ID <CAJPzbvn6ROv9GcZBhExe+2gcT7vGcfkbXOadD=TGHYg5SSdv-Q@mail.gmail.com>
Dear All,

I'm trying to schedule a job to run an XQuery function every day, but I'm
encountering a problem that I don't know how to solve. According to the
documentation, I've added the following lines to eXist-db/etc/conf.xml:

<job type="user" xquery="/db/apps/myapp/myjob.xql" period="86400000"
unschedule-on-exception="false">
<parameter name="user" value="userName"/>
<parameter name="password" value="userPassword"/>
</job>

With the XQuery attribute referring to my XQuery file (with a working
XQuery function) and the parameters defining the username and password
(which are also given in the XQuery file with xmldb:login()), but it
doesn't work.

It seems that there are problems with the user, as indicated by the
scheduler.log file:

2023-10-12 13:31:45,491 [db.exist.scheduler.quartz-worker-3] INFO
 (JobRunShell.java [run]:207) - Job eXist.User.XQuery:
/db/apps/myapp/myjob.xql threw a JobExecutionException:
org.quartz.JobExecutionException: UserXQueryJob Failed: Permission denied
for the scheduling user: guest! Unscheduling UserXQueryJob.
at org.exist.scheduler.UserXQueryJob.abort(UserXQueryJob.java:251)
~[exist-core-6.2.0.jar:6.2.0]
at org.exist.scheduler.UserXQueryJob.abort(UserXQueryJob.java:247)
~[exist-core-6.2.0.jar:6.2.0]
at org.exist.scheduler.UserXQueryJob.execute(UserXQueryJob.java:173)
~[exist-core-6.2.0.jar:6.2.0]
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
~[quartz-2.3.2.jar:?]
at
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
~[quartz-2.3.2.jar:?]

Can anyone tell me how to solve this? I don't understand why the scheduler
is trying to run the function as Guest user.

Best regards,

Nicolas

_______________________________________________
Exist-open mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/exist-open
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.