Skip to content

Instantly share code, notes, and snippets.

@ableasdale
Created June 3, 2015 14:44
Show Gist options
  • Save ableasdale/e82de8e9c5ff3f1fb828 to your computer and use it in GitHub Desktop.
Save ableasdale/e82de8e9c5ff3f1fb828 to your computer and use it in GitHub Desktop.
Get a list of all scheduled tasks (as task paths) from a support dump
xquery version "1.0-ml";
declare namespace db = "http://marklogic.com/xdmp/database";
declare namespace gr = "http://marklogic.com/xdmp/group";
import module namespace admin = "http://marklogic.com/xdmp/admin" at "/MarkLogic/admin.xqy";
declare variable $SUPPORT-DUMP-FILEPATH as xs:string := 'E:\support-request-go\support-request-go.txt';
declare variable $support as document-node()* := xdmp:document-get(
$SUPPORT-DUMP-FILEPATH,
<options xmlns="xdmp:document-get">
<format>xml</format>
<repair>full</repair>
</options>
);
xs:string($support//gr:scheduled-tasks/gr:scheduled-task/gr:task-path)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment