Thank you for the insight on how this works: so you cannot update a scheduled job, but you can update the jobs-to-be-scheduled. Helps a lot, Daniel -----Ursprüngliche Nachricht----- Von: Christian Grün <christian.gruen@gmail.com> Gesendet: Donnerstag, 6. Mai 2021 13:52 An: Zimmel, Daniel <D.Zimmel@ESVmedien.de> Cc: basex-talk@mailman.uni-konstanz.de Betreff: Re: [basex-talk] Clarification on registering a job service Hi Daniel, I have decided to remove the misleading information in the documentation as it would probably be confusing to explain the full background: • If a job is currently registered for scheduled execution, a new job with the same name will be rejected. • If the job has been registered as service, but if it’s not currently scheduled (e.g. because the job will only be run once at startup time), it can be replaced with a new job. You can stop scheduled jobs as follows (and register new ones after that): for $job in jobs:list-details() where $job/@state = 'scheduled' return jobs:stop($job/@id) Hope this helps Christian On Thu, May 6, 2021 at 11:12 AM Zimmel, Daniel <D.Zimmel@esvmedien.de> wrote:
Hi,
can someone clarify on the following behaviour?
The docs say:
"Job services can be updated: If a new job is registered, and if there is already a job with the same id, the old entry will be replaced." https://docs.basex.org/wiki/Jobs_Module#Services
So when I try to update an existing job service with the following query, I get an unexpected error "Job id already exists: myquery.":
jobs:eval( xs:anyURI('myquery.xq'), (), map { 'id':'myquery', 'start':'19:00:00', 'interval':'P1D', 'service': true() } )
Am I reading the documentation wrong?
Thanks Daniel