|
|
admin:group-add-scheduled-task(
|
|
$config as element(configuration),
|
|
$group-id as xs:unsignedLong,
|
|
$scheduled-tasks as element(gr:scheduled-task)*
|
| ) as element(configuration) |
|
 |
Summary:
This function adds one or more scheduled tasks to the specified group.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$group-id
:
The ID of the group on which the scheduled tasks are configured.
Typically, this is the result of an
admin:group-get-id call.
|
$scheduled-tasks
:
One or more scheduled tasks, such as those created by the task-create
functions.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $task := admin:group-hourly-scheduled-task(
"/Scheduler_test.xqy",
"/Docs",
2,
30,
xdmp:database("Documents"),
0,
xdmp:user("Jim"),
0)
let $addTask := admin:group-add-scheduled-task($config,
admin:group-get-id($config, "Default"), $task)
return
admin:save-configuration($addTask)
(: Creates an hourly scheduled task and adds it to the "Default" group. :)
|
|
|
|
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?
|
| ) as element(gr:scheduled-task) |
|
 |
Summary:
This function constructs a task to be invoked at daily intervals.
|
Parameters:
$task-path
:
The name of the module to be invoked. The task path must begin with a forward
slash (/) and cannot contain a question mark '?', colon ':' or pound '#' character.
|
$task-root
:
The root directory (filesystem) or URI root (database) that contains the module. For
example, if the module is located in the filesystem under MarkLogic/Docs, specify Docs.
|
$task-period
:
The number of days to elapse
between each invocation of the module.
|
$task-start-time
:
The time of day (in 24:00 notation) to
invoke the module.
|
$task-database
:
The id of the database on which the module
is to be invoked.
|
$task-modules
:
The id of the modules database.
For example, xdmp:database("Modules"). To specify the filesystem, use 0.
|
$task-user
:
The id of the user with permission to
invoke the module. For example, xdmp:user("Jim").
|
$task-host
:
The id of the host on which to
invoke the module. Leave empty, (), to specify all hosts.
|
|
Example:
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)
(: returns a daily scheduled task. :)
|
|
|
|
admin:group-hourly-scheduled-task(
|
|
$task-path as xs:string,
|
|
$task-root as xs:string,
|
|
$task-period as xs:positiveInteger,
|
|
$task-minute as xs:nonNegativeInteger,
|
|
$task-database as xs:unsignedLong,
|
|
$task-modules as xs:unsignedLong,
|
|
$task-user as xs:unsignedLong,
|
|
$task-host as xs:unsignedLong?
|
| ) as element(gr:scheduled-task) |
|
 |
Summary:
This function constructs a task to be invoked at hourly intervals.
|
Parameters:
$task-path
:
The name of the module to be invoked. The task path must begin with a forward
slash (/) and cannot contain a question mark '?', colon ':' or pound '#' character.
|
$task-root
:
The root directory (filesystem) or URI root (database) that contains the module. For
example, if the module is located in the filesystem under MarkLogic/Docs, specify Docs.
|
$task-period
:
The number of hours to elapse
between each invocation of the module.
|
$task-minute
:
The number of minutes after the hour to invoke the module. This value must be 59 or less.
Note that this setting does not add to the task-period value.
|
$task-database
:
The id of the database on which the module
is to be invoked.
|
$task-modules
:
The id of the modules database.
For example, xdmp:database("Modules"). To specify the filesystem, use 0.
|
$task-user
:
The id of the user with permission to
invoke the module. For example, xdmp:user("Jim").
|
$task-host
:
The id of the host on which to
invoke the module. Leave empty, (), to specify all hosts.
|
|
Example:
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-hourly-scheduled-task(
"/Scheduler_test.xqy",
"/Docs",
2,
30,
xdmp:database("Documents"),
0,
xdmp:user("Jim"),
0)
(: returns an hourly scheduled task. :)
|
|
|
|
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?
|
| ) as element(gr:scheduled-task) |
|
 |
Summary:
This function constructs a task to be invoked at intervals defined in terms of minutes.
|
Parameters:
$task-path
:
The name of the module to be invoked. The task path must begin with a forward
slash (/) and cannot contain a question mark '?', colon ':' or pound '#' character.
|
$task-root
:
The root directory (filesystem) or URI root (database) that contains the module. For
example, if the module is located in the filesystem under MarkLogic/Docs, specify Docs.
|
$task-period
:
The number of minutes to elapse
between each invocation of the module.
|
$task-database
:
The id of the database on which the module
is to be invoked.
|
$task-modules
:
The id of the modules database.
For example, xdmp:database("Modules"). To specify the filesystem, use 0.
|
$task-user
:
The id of the user with permission to
invoke the module. For example, xdmp:user("Jim").
|
$task-host
:
The id of the host on which to
invoke the module. Leave empty, (), to specify all hosts.
|
|
Example:
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)
(: returns a minutely scheduled task. :)
|
|
|
|
admin:group-monthly-scheduled-task(
|
|
$task-path as xs:string,
|
|
$task-root as xs:string,
|
|
$task-period as xs:positiveInteger,
|
|
$task-month-day as xs:unsignedLong,
|
|
$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?
|
| ) as element(gr:scheduled-task) |
|
 |
Summary:
This function constructs a task to be invoked at monthly intervals.
|
Parameters:
$task-path
:
The name of the module to be invoked. The task path must begin with a forward
slash (/) and cannot contain a question mark '?', colon ':' or pound '#' character.
|
$task-root
:
The root directory (filesystem) or URI root (database) that contains the module. For
example, if the module is located in the filesystem under MarkLogic/Docs, specify Docs.
|
$task-period
:
The number of months to elapse
between each invocation of the module.
|
$task-month-day
:
The day of the month to invoke the module.
|
$task-start-time
:
The time of day (in 24:00 notation) to
invoke the module.
|
$task-database
:
The id of the database on which the module
is to be invoked.
|
$task-modules
:
The id of the modules database.
For example, xdmp:database("Modules"). To specify the filesystem, use 0.
|
$task-user
:
The id of the user with permission to
invoke the module. For example, xdmp:user("Jim").
|
$task-host
:
The id of the host on which to
invoke the module. Leave empty, (), to specify all hosts.
|
|
Example:
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-monthly-scheduled-task(
"/Scheduler_test.xqy",
"/Docs",
2,
3,
xs:time("14:42:52"),
xdmp:database("Documents"),
0,
xdmp:user("Jim"),
0)
(: returns a monthly scheduled task. :)
|
|
|
|
admin:group-one-time-scheduled-task(
|
|
$task-path as xs:string,
|
|
$task-root as xs:string,
|
|
$task-start as xs:dateTime,
|
|
$task-database as xs:unsignedLong,
|
|
$task-modules as xs:unsignedLong,
|
|
$task-user as xs:unsignedLong,
|
|
$task-host as xs:unsignedLong?
|
| ) as element(gr:scheduled-task) |
|
 |
Summary:
This function constructs a task to be invoked once, at a specific calendar day and time.
|
Parameters:
$task-path
:
The name of the module to be invoked. The task path must begin with a forward
slash (/) and cannot contain a question mark '?', colon ':' or pound '#' character.
|
$task-root
:
The root directory (filesystem) or URI root (database) that contains the module. For
example, if the module is located in the filesystem under MarkLogic/Docs, specify Docs.
|
$task-start
:
The date and time on which the task is to start.
|
$task-database
:
The id of the database on which the module
is to be invoked.
|
$task-modules
:
The id of the modules database.
For example, xdmp:database("Modules"). To specify the filesystem, use 0.
|
$task-user
:
The id of the user with permission to
invoke the module. For example, xdmp:user("Jim").
|
$task-host
:
The id of the host on which to
invoke the module. Leave empty, (), to specify all hosts.
|
|
Example:
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-one-time-scheduled-task(
"/Scheduler_test.xqy",
"/Docs",
xs:dateTime("2009-03-29T14:42:52"),
xdmp:database("Documents"),
xdmp:database("Documents"),
xdmp:user("Jim"),
admin:host-get-id($config, xdmp:host-name()))
(: returns a one-time scheduled task. :)
|
|
|
|
admin:group-weekly-scheduled-task(
|
|
$task-path as xs:string,
|
|
$task-root as xs:string,
|
|
$task-period as xs:positiveInteger,
|
|
$task-days as xs:string+,
|
|
$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?
|
| ) as element(gr:scheduled-task) |
|
 |
Summary:
This function constructs a task to be invoked at weekly intervals.
|
Parameters:
$task-path
:
The name of the module to be invoked. The task path must begin with a forward
slash (/) and cannot contain a question mark '?', colon ':' or pound '#' character.
|
$task-root
:
The root directory (filesystem) or URI root (database) that contains the module. For
example, if the module is located in the filesystem under MarkLogic/Docs, specify Docs.
|
$task-period
:
The number of weeks to elapse
between each invocation of the module.
|
$task-days
:
One or more days on the specified week to
invoke the module
|
$task-start-time
:
The time of day (in 24:00 notation) to
invoke the module.
|
$task-database
:
The id of the database on which the module
is to be invoked.
|
$task-modules
:
The id of the modules database.
For example, xdmp:database("Modules"). To specify the filesystem, use 0.
|
$task-user
:
The id of the user with permission to
invoke the module. For example, xdmp:user("Jim").
|
$task-host
:
The id of the host on which to
invoke the module. Leave empty, (), to specify all hosts.
|
|
Example:
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-weekly-scheduled-task(
"/Scheduler_test.xqy",
"/Docs",
2,
("Monday", "Wednesday"),
xs:time("14:42:52"),
xdmp:database("Documents"),
xdmp:database("Documents"),
xdmp:user("Jim"),
admin:host-get-id($config, xdmp:host-name()))
(: returns a weekly scheduled task. :)
|
|
|