Navigation

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

    A command will run in command prompt but not in cron service

    General pfSense Questions
    2
    4
    44
    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.
    • K
      kejianshi last edited by

      This command will run just fine and update my dynamic DNS for my SG-1100 in the diagnostics/command prompt but for some reason the exact same command will not run in the cron service. Any ideas?

      /usr/bin/fetch http://freedns.afraid.org/dynamic/update.php?xxxxxxMyPrivateKeyxxxxx >> /tmp/freedns_subdmn_mydmn_cm.log 2>&1 &

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

        Cron runs as a different user and usaully the reason for this is no path to the command but that looks OK here.

        I would have to guess it's a permissions issue. Will it run if you don't redirect the output?

        Steve

        K 1 Reply Last reply Reply Quote 0
        • K
          kejianshi last edited by

          I can try it without redirects. I'm running it as root in cron. Its abit odd since this runs fine on other machines without even the complete path to the command. But this is a different architecture than x86 and amd64. You not being sure makes me feel less stupid at least (-:

          1 Reply Last reply Reply Quote 0
          • K
            kejianshi @stephenw10 last edited by kejianshi

            @stephenw10 Found the problem. Somehow characters that don't show up got in there. Perhaps when I did a copy/past from the old config? Manually retyping fixed it. But unlike before, the entire path is required.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post