Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    cron job wont stop

    Scheduled Pinned Locked Moved General pfSense Questions
    16 Posts 4 Posters 1.4k Views
    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.
    • M
      michmoor LAYER 8 Rebel Alliance @jrey
      last edited by

      @jrey Its running every minute for some reason. Every 12hrs i have set up works fine for me.

      Firewall: NetGate,Palo Alto-VM,Juniper SRX
      Routing: Juniper, Arista, Cisco
      Switching: Juniper, Arista, Cisco
      Wireless: Unifi, Aruba IAP
      JNCIP,CCNP Enterprise

      J 1 Reply Last reply Reply Quote 0
      • J
        jrey @michmoor
        last edited by

        @michmoor

        because you have an * in the first position Every minute of the 12th hour of every day is that really what you want ?

        you likely want it to run 1 time so pick a minute in the 12th hour

        10 12 * * *

        on the 10th minute of the 12th hour of every day...

        if you want to run it twice a day.

        10 0,12 * * *

        the 10th minute of hour 0 and 12

        so run at
        00:10
        12:10

        M 1 Reply Last reply Reply Quote 2
        • stephenw10S
          stephenw10 Netgate Administrator
          last edited by

          What are you trying to do there? You appear to have it set to run every minute in hour 12. And it looks to be doing that.

          You probably want minute 1 of hour 12 like:
          1 12 * * * root /usr/local/bin/php -q /root/pkg_check.php

          M 1 Reply Last reply Reply Quote 1
          • M
            michmoor LAYER 8 Rebel Alliance @stephenw10
            last edited by

            @stephenw10 Ok i see the error.

            Curious why the other firewall isn't firing off every minute as well. There are packages that need upgrading.

            But good catch everyone. Thanks for pointing out the error to me.

            Firewall: NetGate,Palo Alto-VM,Juniper SRX
            Routing: Juniper, Arista, Cisco
            Switching: Juniper, Arista, Cisco
            Wireless: Unifi, Aruba IAP
            JNCIP,CCNP Enterprise

            J 1 Reply Last reply Reply Quote 0
            • M
              michmoor LAYER 8 Rebel Alliance @jrey
              last edited by

              @jrey said in cron job wont stop:

              o run 1 time so pick a minute in the

              Thats exactly the problem. Thanks @jrey

              Firewall: NetGate,Palo Alto-VM,Juniper SRX
              Routing: Juniper, Arista, Cisco
              Switching: Juniper, Arista, Cisco
              Wireless: Unifi, Aruba IAP
              JNCIP,CCNP Enterprise

              1 Reply Last reply Reply Quote 0
              • J
                jrey @michmoor
                last edited by

                @michmoor said in cron job wont stop:

                Curious why the other firewall isn't firing off every minute as well

                It likely is - as the cron settings are the same (so it runs fine, might be an illusion)

                Not sure what the script is actually doing, since I don't use it - you want to share the link to it - I'll peek

                but it could simply be a case that the 6100 has enough horse power to complete the task in under a minute and the 1100 does not. Lot's of factors and possibilies to consider -- when the jobs on the 1100 start colliding more bad things likely happen thus the "spam"

                does the script actually log that it has run somewhere ?

                M GertjanG 2 Replies Last reply Reply Quote 0
                • M
                  michmoor LAYER 8 Rebel Alliance @jrey
                  last edited by

                  @jrey

                  The conversation is here. https://forum.netgate.com/topic/137707/auto-update-check-checks-for-updates-to-base-system-packages-and-sends-email-alerts/70

                  The script is here

                  https://gist.github.com/luckman212/5e69ecf04e000ace47eb8f760b71e160

                  Firewall: NetGate,Palo Alto-VM,Juniper SRX
                  Routing: Juniper, Arista, Cisco
                  Switching: Juniper, Arista, Cisco
                  Wireless: Unifi, Aruba IAP
                  JNCIP,CCNP Enterprise

                  J 1 Reply Last reply Reply Quote 0
                  • J
                    jrey @michmoor
                    last edited by

                    @michmoor

                    Yeah I actually just found it

                    Auto update check, checks for updates to base system + packages and sends email alerts:

                    look at the sample cron the author has there in the first post

                    1 18 * * * blah

                    Minute 1 of the 18th hour ..

                    Pick a minute and hour of you choice, run it once not 60 times in the hour, you'll be fine ... servers everywhere will be fine ... spam will stop all will be well.

                    On that post @stephenw10 said in Auto update check, checks for updates to base system + packages and sends email alerts:

                    Needs more blinkenlight action!

                    I don't think he meant once a minute for an hour.... ๐Ÿ˜Š

                    M 1 Reply Last reply Reply Quote 0
                    • M
                      michmoor LAYER 8 Rebel Alliance @jrey
                      last edited by

                      @jrey lol

                      Firewall: NetGate,Palo Alto-VM,Juniper SRX
                      Routing: Juniper, Arista, Cisco
                      Switching: Juniper, Arista, Cisco
                      Wireless: Unifi, Aruba IAP
                      JNCIP,CCNP Enterprise

                      1 Reply Last reply Reply Quote 1
                      • stephenw10S
                        stephenw10 Netgate Administrator
                        last edited by

                        Blinkenlights. Always. ๐Ÿ˜‰

                        1 Reply Last reply Reply Quote 1
                        • GertjanG
                          Gertjan @jrey
                          last edited by

                          @jrey said in cron job wont stop:

                          does the script actually log that it has run somewhere ?

                          If there was a cron log on pfsense, you would see that your 6100 also ran this script every minute.
                          But on 6100 everything is up to date, so according to the script :

                          84b22dc6-a496-4bc2-89a3-ab145b8e15d3-image.png

                          No log lines
                          No message line on the command interface - which is non interactive, so discarded.
                          No message (mail in my case)

                          so the system log doesn't show anything if up to date.

                          No "help me" PM's please. Use the forum, the community will thank you.
                          Edit : and where are the logs ??

                          J 1 Reply Last reply Reply Quote 1
                          • J
                            jrey @Gertjan
                            last edited by

                            @Gertjan

                            Good point - I never actually looked at the script referenced only the post that it was provided on. ๐Ÿ˜ but yes that is why it doesn't show as running on his 6100. It is.

                            Fixing the cron timing so that it does not "Blinkenlights" so many times - should make everything happy on both systems. Only need 1 Blinkenlight in the hour. ๐Ÿคฃ

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post
                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.