
admin: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)
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.
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. :)
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.