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

    cron job

    Scheduled Pinned Locked Moved General pfSense Questions
    8 Posts 3 Posters 830 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
      manilx
      last edited by

      Hi

      I need to run a cron job every 15mins for heartbeat to a alarm service:
      I need to run

      curl "https://ipv64.net/health.php?token=xxxxxxxx"
      

      I've installed the cron package and created a new job

      15 	* 	* 	* 	* 	root 	curl "https://ipv64.net/health.php?token=xxxxxxxx"
      

      On first test this seemed to run but now it doesn't as I don't get the heartbeat at the receiving site.

      1. where can I check if this is running and if it has some error? Can't find the log.
      2. Did I do this correctly?

      Thx in advance!

      S 1 Reply Last reply Reply Quote 0
      • S
        SteveITS Galactic Empire @manilx
        last edited by

        @manilx It should be "*/15" in the first column for every 15 minutes. "15" will run at 15 minutes past the hour. (vs, any time divisible by 15)

        Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
        When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
        Upvote 👍 helpful posts!

        M 1 Reply Last reply Reply Quote 0
        • M
          manilx @SteveITS
          last edited by

          @steveits Thank You! Changed it and will see how it goes.

          M 1 Reply Last reply Reply Quote 0
          • M
            manilx @manilx
            last edited by

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • stephenw10S
              stephenw10 Netgate Administrator
              last edited by

              You also usually need the full path to the binary for commands run there.

              M 1 Reply Last reply Reply Quote 0
              • M
                manilx @stephenw10
                last edited by

                @stephenw10 What would be the full path for curl?

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

                  [22.05-RELEASE][admin@cedev-3.stevew.lan]/root: which curl
                  /usr/local/bin/curl
                  
                  M 1 Reply Last reply Reply Quote 1
                  • M
                    manilx @stephenw10
                    last edited by

                    @stephenw10 All working now. Thank you all.

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