Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Snipe-IT
  3. System Notifications - PHP

System Notifications - PHP

Scheduled Pinned Locked Moved Solved Snipe-IT
9 Posts 2 Posters 1.4k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    TheMoodBoardz
    wrote on last edited by
    #1

    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!

    girishG 1 Reply Last reply
    1
    • T TheMoodBoardz

      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!

      girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by
      #2

      @TheMoodBoardz the package is already configured to run the cron every minute as per https://snipe-it.readme.io/docs/configuring-alerts-backups

      1 Reply Last reply
      0
      • T Offline
        T Offline
        TheMoodBoardz
        wrote on last edited by
        #3

        @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

        girishG 1 Reply Last reply
        0
        • T TheMoodBoardz

          @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

          girishG Offline
          girishG Offline
          girish
          Staff
          wrote on last edited by
          #4

          @TheMoodBoardz which php command did you use?

          1 Reply Last reply
          0
          • T Offline
            T Offline
            TheMoodBoardz
            wrote on last edited by
            #5

            php artisan snipeit:upcoming-audits

            girishG 1 Reply Last reply
            1
            • T Offline
              T Offline
              TheMoodBoardz
              wrote on last edited by
              #6

              they can be found here https://snipe-it.readme.io/docs/notifications-overview

              girishG 1 Reply Last reply
              1
              • T TheMoodBoardz

                they can be found here https://snipe-it.readme.io/docs/notifications-overview

                girishG Offline
                girishG Offline
                girish
                Staff
                wrote on last edited by
                #7

                @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();
                
                1 Reply Last reply
                0
                • T TheMoodBoardz

                  php artisan snipeit:upcoming-audits

                  girishG Offline
                  girishG Offline
                  girish
                  Staff
                  wrote on last edited by girish
                  #8

                  @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
                  
                  1 Reply Last reply
                  2
                  • T Offline
                    T Offline
                    TheMoodBoardz
                    wrote on last edited by
                    #9

                    @girish yes that's fixed it. Thanks

                    1 Reply Last reply
                    0
                    • nebulonN nebulon marked this topic as a question on
                    • nebulonN nebulon has marked this topic as solved on
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Bookmarks
                    • Search