
MarkLogic 10 Product Documentation
admin.groupDailyScheduledTaskadmin.groupDailyScheduledTask(
   task-path as String,
   task-root as String,
   task-period as Number,
   task-start-time as (Number|String),
   task-database as (Number|String),
   task-modules as (Number|String),
   task-user as (Number|String),
   task-host as (Number|String)?,
   [task-priority as String?]
) as element(gr.scheduledTask)
Summary
This function constructs a task to be invoked at daily intervals.
      You can call admin.groupAddScheduledTask to add the task.
  
	  
	  
	
	  
	    | 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 (files system) 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. | 
	  
	  
	    | task-priority | 
	    The priority of the task.
        Either "normal" or "higher". | 
	  
	
Example
  
  const admin = require('/MarkLogic/admin.xqy');
  const config = admin.getConfiguration()
     admin.groupDailyScheduledTask(
        "/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. 
   
  
    Copyright © 2025 MarkLogic Corporation. MARKLOGIC is a
    registered trademark of MarkLogic Corporation.