MarkLogic Server 11.0 Product Documentation
admin:group-one-time-scheduled-taskadmin:group-one-time-scheduled-task(
$task-path as xs:string,
$task-root as xs:string,
$task-start as xs:dateTime,
$task-database as xs:unsignedLong,
$task-modules as xs:unsignedLong,
$task-user as xs:unsignedLong,
$task-host as xs:unsignedLong?,
[$task-priority as xs:string?]
) as element(gr:scheduled-task)
Summary
This function constructs a task to be invoked once, at a specific calendar day and time.
You can call admin:group-add-scheduled-task
to add the task.
Parameters |
task-path |
The name of the module to be invoked. The task path must begin with a forward
slash (/) and cannot contain a question mark '?', colon ':' or pound '#' character.
|
task-root |
The root directory (files system) or URI root (database) that contains the module. For
example, if the module is located in the filesystem under MarkLogic/Docs, specify Docs.
|
task-start |
The date and time on which the task is to start.
|
task-database |
The ID of the database on which the module
is to be invoked. |
task-modules |
The ID of the modules database.
For example, xdmp:database("Modules"). To specify the filesystem, use 0.
|
task-user |
The ID of the user with permission to
invoke the module. For example, xdmp:user("Jim"). |
task-host |
The ID of the host on which to
invoke the module. Leave empty, (), to specify all hosts. |
task-priority |
The priority of the task.
Either "normal" or "higher". |
Example
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:group-one-time-scheduled-task(
"/Scheduler_test.xqy",
"/Docs",
xs:dateTime("2009-03-29T14:42:52"),
xdmp:database("Documents"),
xdmp:database("Documents"),
xdmp:user("Jim"),
admin:host-get-id($config, xdmp:host-name()),
"normal")
(: returns a one-time scheduled task. :)
Copyright © 2024 MarkLogic Corporation. MARKLOGIC is a
registered trademark of MarkLogic Corporation.