Skip to content
Snippets Groups Projects
Commit 15c7a26d authored by Jonathan Foucher's avatar Jonathan Foucher
Browse files

Add notification docs

parent e5ad3886
No related branches found
No related tags found
No related merge requests found
Pipeline #43766 failed
......@@ -60,3 +60,17 @@ server {
access_log /var/log/nginx/madis_access.log;
}
```
##Module notifications
Pour activer le module notifications, rajouter ceci dans le fichier .env :
```
APP_ACTIVATE_NOTIFICATIONS=true
```
Vous devrez ensuite ajouter les deux lignes suivantes à votre cron :
```
* * * * * cd /var/www/madis && $(which php8.1) bin/console notifications:generate >> /var/www/madis/notifications.log
* * * * * cd /var/www/madis && $(which php8.1) bin/console notifications:send >> /var/www/madis/notifications.log
```
En veillant bien à changer le chemin `/var/www/madis/` par celui qui vous correspond.
......@@ -124,7 +124,7 @@ class NotificationsSendCommand extends Command
$nextTimeToSend = $this->getNextTimeToSendFromPreferences($prefs);
if ($nextTimeToSend->format('Ymdhi') !== date('Ymdhi')) {
$output->writeln('Not the time to send. Programmed time is ' . $nextTimeToSend->format('Ymdhi') . 'a dnc urrent time is ' . date('Ymdhi'));
$output->writeln('Not the time to send. Programmed time is ' . $nextTimeToSend->format('YmdHi') . ' and current time is ' . date('YmdHi'));
// Now is not the time to send for this user, abort
continue;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment