Cron Job Help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • smartcard
    Junior Member
    • Mar 2004
    • 11

    #1

    Cron Job Help

    I have a cron job that need to run the "update-quiet.php" file 30 minuts. I have the job as follows, but getting error "No such file or directory"

    Please help me. I am on Cpanle04 server

    Code:
    /usr/local/bin/GET [url]http://mycorrectdomainname.com/feed/update-quiet.php[/url]
  • Jonathan
    Senior Member
    • Mar 2004
    • 1229

    #2
    I'm not big on Cron, but check the buttom of {this page}.
    Looking @ it, it seems if you put "30" for minute, * for hour, change the URL
    I'd think it would run at 30mins every hour, every day...
    "How can someone be so distracted yet so focused?"
    - C

    Comment

    • smartcard
      Junior Member
      • Mar 2004
      • 11

      #3
      Acutaly the problem is not timing, but it can be the commnd.

      My real comman is like this:

      Code:
      30 * * * * /usr/local/bin/GET [url]http://mycorrectdomainname.com/feed/update-quiet.php[/url]

      Comment

      • sdjl
        Senior Member
        • Mar 2004
        • 502

        #4
        If the scripts on the server, why not just use PHP to execute the script?
        Code:
        php /path/to/script/filename.php
        If you want it to be silenced, i.e. no output from the script is emailed to you, use the following.
        Code:
        php /path/to/script/filename.php > /dev/null
        David
        -----
        Do you fear the obsolescence of the metanarrative apparatus of legitimation?

        Comment

        • -Oz-
          Senior Member
          • Mar 2004
          • 545

          #5
          sdjl's way should work because that is how i run php scripts in cron.
          Dan Blomberg

          Comment

          • smartcard
            Junior Member
            • Mar 2004
            • 11

            #6
            Yes it works in that way
            Code:
            php /path/to/script/filename.php
            Thank you.

            Comment

            • Amitabh
              Member
              • Mar 2004
              • 78

              #7
              Just in case you need to use URL, use "wget".
              Code:
               30 * * * * wget http://mycorrectdomainname.com/feed/update-quiet.php
              The direct execution method is more efficient method though if you want to execute a local script through PHP.

              Comment

              Working...