You are not logged in.
Pages: 1
Hello,
is there a possibility in GLPI to activate the e-mail notifications for certain days. So the emails for the cartridges should only be sent from Mon-Fri, the ticket notifications should also be sent on weekends, etc.
The automatic jobs run in CLI mode and the cron task runs every 5 minutes.
Last edited by Maschik1234 (2023-09-04 08:48:46)
Offline
This is not currently possible in GLPi itself. Automatic actions can be configured to run between specific hours, but not configured to run on specific days.
The only workaround is to have a crontab entry for individual tasks rather than one entry for all of them to be able to use the scheduler in cron more effectively.
When calling the /front/cron.php script, you can add "--force" to the command followed by a space and then the internal name of the crontask to run just that specified task. You can find a list of those tasks in the user documentation.
https://glpi-user-documentation.readthe … n-from-cli
Currently, there is no way to tell the cron.php script to run all tasks except a specific one/specific set, so it could be a pain to manage as you would need an entry for every task and keep the list updated if new tasks are added by a GLPI update or plugins.
Cron schedule for every 5 minutes, only on Monday - Friday:
*/5 * * * 1-5
Note that this would only really work to have a different notification schedule for alerts due to how they work.
There are separate tasks for alerts like cartridge stock, certificate expiration, etc. When these tasks run, a notification is generated but since notifications get sent to the queue first, it is not immediately sent.
If these alert tasks only run on weekdays while notifications can be sent any time, the notification should send within 5 minutes.
If you wanted to have different schedules for other notifications like ticket updates and change updates, this wouldn't work.
If you wanted alert notifications to work any time while other notifications were more limited, that also wouldn't work.
GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.
Offline
Is such a feature in the works or planned?
Would be very helpful.
Offline
Pages: 1