admin:group-minutely-scheduled-task( $task-path as xs:string, $task-root as xs:string, $task-period as xs:positiveInteger, $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 at intervals defined in terms of minutes.
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-minutely-scheduled-task( "/Scheduler_test.xqy", "/Docs", 45, xdmp:database("Documents"), 0, xdmp:user("Jim"), 0, "normal") (: returns a minutely scheduled task. :)
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.