System Notifications - PHP
-
Hi All,
I have limited knowledge on PHP commands, ect.
The Expected check-in, Item expiration, Low inventory alerts, Audit Due / Overdue require php commands to send however its not clear if these should be on a timer or not. I thought Crontab managed when it would send, but I am wrong.
Hope you can help!
-
@TheMoodBoardz the package is already configured to run the cron every minute as per https://snipe-it.readme.io/docs/configuring-alerts-backups
-
@girish that's what I thought however it does not seem to do it for us as we have only had the "Audit Due / Overdue" email today as I used the php command
-
@TheMoodBoardz which php command did you use?
-
php artisan snipeit:upcoming-audits
-
they can be found here https://snipe-it.readme.io/docs/notifications-overview
-
@TheMoodBoardz so per https://snipe-it.readme.io/docs/configuring-alerts-backups the default is like below. As you can see, the upcoming-audits is only run once a day.
$schedule->command('snipeit:expiring-alerts')->daily(); $schedule->command('snipeit:inventory-alerts')->daily(); $schedule->command('snipeit:backup')->weekly(); $schedule->command('backup:clean')->daily(); $schedule->command('snipeit:expected-checkin')->daily(); $schedule->command('snipeit:upcoming-audits')->daily(); $schedule->command('auth:clear-resets')->everyFifteenMinutes();
-
@TheMoodBoardz you can setup for hourly run (or whatever schedule you prefer) using https://docs.cloudron.io/apps/#cron .
So, just put an entry like (sudo -E -u makes it run as www-data user):
@hourly sudo -E -u www-data php /app/code/artisan snipeit:upcoming-audits
If you want some logs:
@hourly echo "== Running upcoming-audits alert" && sudo -E -u www-data php /app/code/artisan snipeit:upcoming-audits
-
@girish yes that's fixed it. Thanks
-
-