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

    Cron does not work specifing time

    Scheduled Pinned Locked Moved Off-Topic & Non-Support Discussion
    8 Posts 3 Posters 805 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.
    • V
      vielfede
      last edited by

      Is there any reason because when I specfy time cron does not work?

      •   *       *       *       *       root    /usr/bin/touch /root/scripts/lastexe
        

      works

      25      15      *       *       *       root    /usr/bin/touch /root/scripts/lastexe
      

      does not

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        What are you expecting that second entry to do? It would run once per day at 3:25 PM.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        V 1 Reply Last reply Reply Quote 0
        • V
          vielfede @jimp
          last edited by

          @jimp said in Cron does not work specifing time:

          What are you expecting that second entry to do? It would run once per day at 3:25 PM.

          Right... but It does not.
          this is what I have found out today
          [2.4.4-RELEASE][admin@pfsLazzarini.localdomain]/root/scripts: ls -l
          total 5
          -rw-r--r-- 1 root wheel 0 May 6 20:48 lastexe

          20:48.... I do not know....

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            What does the entry look like in /etc/crontab?

            Is this bare metal hardware or a VM? Is the clock OK on there? Time zone?

            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            1 Reply Last reply Reply Quote 0
            • V
              vielfede
              last edited by

              it is a VM
              [2.4.4-RELEASE][admin@pfsLazzarini.localdomain]/root/scripts: date
              Fri May 8 00:09:26 CEST 2020

              jimpJ 1 Reply Last reply Reply Quote 0
              • B
                biggsy
                last edited by

                @vielfede said in Cron does not work specifing time:

                -rw-r--r-- 1 root wheel 0 May 6 20:48 lastexe

                I'm certainly no expert but doesn't it need to be executable?

                chmod 744 /root/scripts/lastexe
                
                jimpJ 1 Reply Last reply Reply Quote 0
                • jimpJ
                  jimp Rebel Alliance Developer Netgate @biggsy
                  last edited by

                  @biggsy said in Cron does not work specifing time:

                  I'm certainly no expert but doesn't it need to be executable?

                  In this example /usr/bin/touch is the executable being run, /root/scripts/lastexe is a parameter.

                  Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                  Need help fast? Netgate Global Support!

                  Do not Chat/PM for help!

                  1 Reply Last reply Reply Quote 0
                  • jimpJ
                    jimp Rebel Alliance Developer Netgate @vielfede
                    last edited by

                    @vielfede said in Cron does not work specifing time:

                    it is a VM
                    [2.4.4-RELEASE][admin@pfsLazzarini.localdomain]/root/scripts: date
                    Fri May 8 00:09:26 CEST 2020

                    Being in a VM could mean the time is even worse than usual. Also you're on 2.4.4, should be on 2.4.5.

                    A couple other things: Make sure the Hypervisor clock is OK, and if this is ESX, (a) make sure that ESX is up-to-date and a current supported version (e.g. 6.7), (b) make sure the VM hardware support has been updated to the highest level supported by the hypervisor, (c) make sure the OS type configured in the VM settings matches the pfSense version installed, and (d) make sure that Open-VM-Tools is installed and up-to-date.

                    Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                    Need help fast? Netgate Global Support!

                    Do not Chat/PM for help!

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