LUTECE-2213 : Add the possibility to trigger deamons using cron patte…#150
LUTECE-2213 : Add the possibility to trigger deamons using cron patte…#150ThomasDumont wants to merge 1 commit intolutece-platform:develop7.xfrom
Conversation
…rns with job scheduler service
|
Currently on Lutece, daemons can only be executed at the moment of their activation and then at a fixed interval. When the tasks must be scheduled at specified times, one must use solutions outside the application (batch, external server, etc,) which makes the management of projects more complex (multiplication of logs, access points, etc,). |
|
@pierrelevy what do you think ? |
|
@ThomasDumont about your first sentence : Daemons can also be executed when signaled, either manually from the manage daemon page, or from code (see LUTECE-2085). For instance, after mail is enqueued, the mail daemon is signaled so that the mail is sent as soon as possible. I've not run your code yet, but it seems that you introduce a new, independent way of running daemons, whose configuration is hidden behind a button on the manage daemons page, which seems confusing to me. If I understand well, a daemon can be displayed as stopped on the manage daemons page, but run anyway because a cron trigger has been configured ?
Finally, I think your DaemonJob class should call AppDaemonService.signalDaemon(key) instead of running the daemon directly. This way, you get several benefits :
|
|
@rzara Thank you for your feedbacks.
|
135e4f9 to
e399c1d
Compare
…rns with job scheduler service