Crons what the hell

Discussion in 'PHP' started by microfix, Apr 19, 2007.

  1. #1
    is this the right command to point to my cron

    home/adtoxic/public_html/admin/cron_job_featured_sites.php
     
    microfix, Apr 19, 2007 IP
  2. TwistMyArm

    TwistMyArm Peon

    Messages:
    931
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Assuming you copied that directly and completely, you're missing a forward slash at the start.

    You may also need to provide the php CLI app name at the start.
     
    TwistMyArm, Apr 19, 2007 IP
  3. decepti0n

    decepti0n Peon

    Messages:
    519
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #3
    The way I did mine, was:

    curl http://site.bah/script.php
    Code (markup):
     
    decepti0n, Apr 19, 2007 IP
  4. Kalyse

    Kalyse Peon

    Messages:
    1,221
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Yup, I do it with linx or.. get
     
    Kalyse, Apr 19, 2007 IP
  5. microfix

    microfix Peon

    Messages:
    210
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    /home/adtoxic/public_html/admin/cron_job_featured_sites.php: line 1: ?php: No such file or directory
    /home/adtoxic/public_html/admin/cron_job_featured_sites.php: line 2: syntax error near unexpected token `"path.php"'
    /home/adtoxic/public_html/admin/cron_job_featured_sites.php: line 2: ` require ("path.php");'

    im getting
     
    microfix, Apr 19, 2007 IP
  6. microfix

    microfix Peon

    Messages:
    210
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Help Help Gulp :p
     
    microfix, Apr 19, 2007 IP
  7. Kalyse

    Kalyse Peon

    Messages:
    1,221
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Run it from the web so you get the paths correctly...

    When you run from cron it is ran from root directory (unless configured otherwise), so your includes in the files are all completely100% wrong.

    Thats why I use wget or lynx
     
    Kalyse, Apr 19, 2007 IP
  8. microfix

    microfix Peon

    Messages:
    210
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #8
    can someone please do it for me, im very new to it and wont touch it again :)
    Rewards for the daddy
     
    microfix, Apr 20, 2007 IP
  9. Xcap

    Xcap Peon

    Messages:
    25
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #9
    PM me and I fix it for you.
     
    Xcap, Apr 21, 2007 IP