ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Crontab - Snipe-IT Scheduling

    IT Discussion
    crontab noob learning snipe-it
    2
    8
    3.0k
    Loading More Posts
    • 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.
    • DustinB3403D
      DustinB3403
      last edited by DustinB3403

      So as I'm adding more features to the "I really want that" list one of them is a daily report that'll run and tell me what if anything is nearing expiration. Software licenses is what I'm discussing.

      Based on the documentation

      Adding @daily /var/www/html/snipeit /var/www/html/snipeit/artisan snipeit:expiring-alerts should bypass the "report on everything" and only report on expiring licensing.

      Is this correct? I honestly never schedule anything (period) so my skills and expertise with crontab is less than ideal.

      I used the installer script to create this installation, and based on what I can find, the paths should be correct.

      1 Reply Last reply Reply Quote 1
      • DustinB3403D
        DustinB3403
        last edited by DustinB3403

        I read through the installer script quickly searching for anything with php and nothing is specifically listing a directory in which it installs.

        At least not from what I saw. When I run any php commands like (when making changes to the .env file) php artisan config:clear and php artisan config:cache

        For them to effect the system I need to be in /var/www/html/snipeit thus I think I'm correct. . .

        1 Reply Last reply Reply Quote 0
        • DustinB3403D
          DustinB3403
          last edited by

          Ok well I was completely wrong lol. . .

          Learned something new though. To find where php is loaded use which <command name> in this case which php which listed /usr/bin/php

          The the full crontab command is @daily /usr/bin/php /var/www/html/snipeit/artisan snipeit:expiring-alerts for my case.

          That's insanely easy, so easy that it's almost difficult because you overthink it. . .

          black3dynamiteB 1 Reply Last reply Reply Quote 1
          • DustinB3403D
            DustinB3403
            last edited by

            And it works.

            Manually running /usr/bin/php /var/www/html/snipeit/artisan snipeit:expiring-alerts listed expiring licenses and warranties.

            I might dig into that a bit later. I'm just glad it works.

            1 Reply Last reply Reply Quote 1
            • black3dynamiteB
              black3dynamite @DustinB3403
              last edited by

              @dustinb3403 said in Crontab - Snipe-IT Scheduling:

              Ok well I was completely wrong lol. . .

              Learned something new though. To find where php is loaded use which <command name> in this case which php which listed /usr/bin/php

              The the full crontab command is @daily /usr/bin/php /var/www/html/snipeit/artisan snipeit:expiring-alerts for my case.

              That's insanely easy, so easy that it's almost difficult because you overthink it. . .

              Do you still have runas apache?

              DustinB3403D 2 Replies Last reply Reply Quote 0
              • DustinB3403D
                DustinB3403 @black3dynamite
                last edited by

                @black3dynamite said in Crontab - Snipe-IT Scheduling:

                @dustinb3403 said in Crontab - Snipe-IT Scheduling:

                Ok well I was completely wrong lol. . .

                Learned something new though. To find where php is loaded use which <command name> in this case which php which listed /usr/bin/php

                The the full crontab command is @daily /usr/bin/php /var/www/html/snipeit/artisan snipeit:expiring-alerts for my case.

                That's insanely easy, so easy that it's almost difficult because you overthink it. . .

                Do you still have runas apache?

                My user is in the apache and wheel groups.

                1 Reply Last reply Reply Quote 0
                • DustinB3403D
                  DustinB3403 @black3dynamite
                  last edited by

                  @black3dynamite

                  groups myuser 
                  myuser : myuser wheel apache
                  
                  1 Reply Last reply Reply Quote 0
                  • DustinB3403D
                    DustinB3403
                    last edited by DustinB3403

                    I also had to fix a permissions issue from a while back, that wasn't affecting anything until I went to get this feature to be functional.

                    1 Reply Last reply Reply Quote 0
                    • 1 / 1
                    • First post
                      Last post