Hi Jakob,

Debugging things on the task server can be a little tricky...

When you say manually it works, what do you mean?  If you do an:

xdmp:invoke("/app/backend/update.xqy") it works?

The exception you are seeing can happen if the document /app/backend/update.xqy 
is not loaded as a text document, or if the document cannot be found (or if 
there is a permission issue causing it not to be found, but since you are 
running as admin that should not be the case--assuming your admin user has the 
admin role).  So the first thing to verify is that the doistats-database 
database has the app/backend/update.xqy document loaded as a text file.

For example, if you load a main module as follows, then you can confirm it is a 
text document as follows:

xdmp:document-insert("/test/test.xqy", text {"'hello'"}) ;

if ( doc("/test/test.xqy")/node()
       instance of text() )
then "text" 
else "not text"

And yes, to change a scheduled task you must delete it and then recreate it.

-Danny 

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Jakob Fix
Sent: Monday, August 10, 2009 3:09 AM
To: General Mark Logic Developer Discussion
Subject: [MarkLogic Dev General] scheduled task (task root?)

I've created a scheduled task in MLS 4.1.  It does not run:

not with "/" as the task root
2009-08-08 21:32:00.106 Notice: TaskServer: XDMP-TEXTNODE:
/app/backend/upate.xqy -- Server unable to build program from non-text
document
2009-08-08 21:32:00.106 Notice: TaskServer: in /app/backend/upate.xqy [1.0-ml]

nor with "http://server:8004/";
2009-08-10 12:00:00.050 Notice: TaskServer: XDMP-TEXTNODE:
http://server:8004/app/backend/update.xqy -- Server unable to build
program from non-text document
2009-08-10 12:00:00.050 Notice: TaskServer: in /app/backend/update.xqy [1.0-ml]

manually, it works (of course).

I have searched the marklogic mailing list for discussions with this
kind of problem and only found one message from May 2008 which had
encountered this type of exception
(http://markmail.org/thread/nk26f2eizhqy3scy).  In my case, it seems
to be a problem with the "task root" property of the scheduled task
which is explained in the help as follows:

"task root specifies the root directory (files [sic] system) or URI
root (database) that contains the module."

I'm in the latter case where the xquery sits in the
"doistats-database" database in the /app/backend/ directory.  Or could
the problem lie somewhere else (permissions? I'm running this as admin
with all privileges)?

here are the task details:

task path: /app/backend/update.xqy
task root: /
task type: daily
task period: 1
task start time 9:32 PM
task database: doistats-database
task modules: doistats-database
task user: admin
task host: server


BTW, it seems a scheduled task cannot be modified, but only deleted?
(I filed a case with support@).

thanks,
Jakob.
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to