Nov 9, 2021 3:45:22 PM Thomas Dumont avatar



A daemon is a process that runs at regular intervals. Lutece has a centralized interface for managing daemons. Each daemon has its own frequency of execution. In addition, he must provide a report of the treatment carried out. This one is thus searchable in the daemons management interface.



A daemon must extend Lutece's Daemon class. The only method to implement is the run method within which you must call the setLastRunLogs method to pass the execution report to it.


/ **
 * My Daemon
 * /
public class MyDaemon extends Daemon
    / **
     * {@inheritDoc}
     * /
    public void run( )
        setLastRunLogs( MyProcess ( ) );


The Daemon must be declared in 2 places :

Declaration in the plugin XML file

This declaration defines the Java class of the daemon as well as the name and description of the daemon by its i18n keys (to manage the language of the user who consults the centralized interface).

<!-- Daemons -->

Declaration in the plugin properties file

This statement is about daemon launch settings.


These values ​​are by default in the properties file of the plugin, but they can be placed in any properties file read by Lutece (ex:

IMPORTANT From Lutece v4:

The values ​​in this file are read only for the first launch. These values ​​are then stored in the LUTECE Datastore and can only be modified by the centralized daemon management interface.