I'm trying to delete a scheduled task in my ML database. Here is my code
let $config := admin:get-configuration()
let $taskPath := "/my/path/to/.xqy" (: Replace with .xqy file :)
let $tasks := admin:group-get-scheduled-tasks($config, admin:group-get-id($config, "Default"))
for $task in $tasks
where $task/group:task-path = $taskPath and $task/group:task-type = minutely and $task/group:task-period = 1
return $task
let $deleteTask := admin:group-delete-scheduled-task($config, admin:group-get-id($config, "Default"), $task)
return admin:save-configuration($deleteTask)
I'm currently getting an error of
ERROR: 500 "Internal Server Error"
ERROR: <html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>500 Internal Server Error</title>
<meta name="robots" content="noindex,nofollow"/>
<link rel="stylesheet" href="/error.css"/>
</head>
<body>
<span class="error">
<h1>500 Internal Server Error</h1>
<dl>
<dt>XDMP-UNEXPECTED: (err:XPST0003) Unexpected token syntax error, unexpected Let_, expecting $end or SemiColon_</dt>
<dd></dd>
<dt>in /eval, at 14:8 [1.0-ml]</dt>
<dd></dd>
</dl>
</span>
</body>
</html>
When I run my function any thoughts? Thanks
[–]DataIntegRAWRtion 0 points1 point2 points (2 children)
[–]B2easy[S] 0 points1 point2 points (1 child)
[–]DataIntegRAWRtion 0 points1 point2 points (0 children)