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

    cron job

    Scheduled Pinned Locked Moved General pfSense Questions
    8 Posts 3 Posters 860 Views 3 Watching
    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 Offline
      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 Offline
        SteveITS Rebel Alliance @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)

        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 reboot, or more depending on packages, and device or disk speed.
        Upvote 👍 helpful posts!

        M 1 Reply Last reply Reply Quote 0
        • M Offline
          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 Offline
            manilx @manilx
            last edited by

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • stephenw10S Online
              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 Offline
                manilx @stephenw10
                last edited by

                @stephenw10 What would be the full path for curl?

                1 Reply Last reply Reply Quote 0
                • stephenw10S Online
                  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 Offline
                    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.