xdmp:spawn-in( $path as xs:string, $ID as xs:unsignedLong, [$vars as item()*], [$modules as xs:unsignedLong?], [$root as xs:string?] ) as empty-sequence()
[DEPRECATED: use xdmp:spawn
with the
database option instead] Place the specified module on the task
queue for evaluation. It will be evaluated in the given database.
The xdmp:spawn-in
function places the specified XQuery
module in the task queue to be processed. The module will be evaluated
when the task server has the available resources to process it. The tasks
are processed in the order in which they are added to the queue.
xdmp:spawn-in("example.xqy", 324398742983742, (), xdmp:modules-database(), "http://example.com/application/") => () Puts the module from the modules database with the URI http://example.com/application/module.xqy in the task server queue. The module will be executed in the context of the database with an ID of 324398742983742.
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.