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

    Cron job won't run!

    Scheduled Pinned Locked Moved pfSense Packages
    7 Posts 2 Posters 712 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.
    • S
      scilek
      last edited by

      I am trying to get Cron to run some bash script every day at 00:15 and 12:15 on a pfSense (2.4.4 p3) router with the settings shown below:

      d2a149df-5366-4efd-88fd-41e390df0848-image.png

      However, the job will not run. But if I define the same job as two separate entries, it will:

      c35f3e90-88c7-4573-987b-a83d7c376eb2-image.png

      29301ddd-6fe2-435a-9f2b-387178423e84-image.png

      What am I doing wrong?

      1 Reply Last reply Reply Quote 0
      • RonpfSR
        RonpfS
        last edited by

        remove the space between the , and 12

        2.4.5-RELEASE-p1 (amd64)
        Intel Core2 Quad CPU Q8400 @ 2.66GHz 8GB
        Backup 0.5_5, Bandwidthd 0.7.4_4, Cron 0.3.7_5, pfBlockerNG-devel 3.0.0_16, Status_Traffic_Totals 2.3.1_1, System_Patches 1.2_5

        S 1 Reply Last reply Reply Quote 1
        • S
          scilek @RonpfS
          last edited by

          @RonpfS said in Cron job won't run!:

          remove the space between the , and 12

          I did and it worked. But I wonder why.

          1 Reply Last reply Reply Quote 0
          • RonpfSR
            RonpfS
            last edited by RonpfS

            Space isn't a digit 😑
            https://www.freebsd.org/cgi/man.cgi?crontab(5)

            2.4.5-RELEASE-p1 (amd64)
            Intel Core2 Quad CPU Q8400 @ 2.66GHz 8GB
            Backup 0.5_5, Bandwidthd 0.7.4_4, Cron 0.3.7_5, pfBlockerNG-devel 3.0.0_16, Status_Traffic_Totals 2.3.1_1, System_Patches 1.2_5

            1 Reply Last reply Reply Quote 0
            • S
              scilek
              last edited by

              Yes of course! How could I miss that! Cron treats every whitespace character as delimiter to separate minutes from hours and so on and thus flags the line as faulty and silently discards it. But I believe pfSense should issue a warning then the user forgets that fact, don't you think?

              1 Reply Last reply Reply Quote 0
              • RonpfSR
                RonpfS
                last edited by

                You don't see anythings in the systems logs ?

                2.4.5-RELEASE-p1 (amd64)
                Intel Core2 Quad CPU Q8400 @ 2.66GHz 8GB
                Backup 0.5_5, Bandwidthd 0.7.4_4, Cron 0.3.7_5, pfBlockerNG-devel 3.0.0_16, Status_Traffic_Totals 2.3.1_1, System_Patches 1.2_5

                1 Reply Last reply Reply Quote 0
                • S
                  scilek
                  last edited by

                  No, nothing concerning the said Cron job.

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