admin:group-daily-scheduled-task( $task-path as xs:string, $task-root as xs:string, $task-period as xs:positiveInteger, $task-start-time as xs:time, $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 daily intervals.
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-daily-scheduled-task( "/Scheduler_test.xqy", "/Docs", 2, xs:time("09:30:00"), xdmp:database("Documents"), xdmp:database("Modules"), xdmp:user("Jim"), 0, "normal") (: returns a daily scheduled task. :)
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.