Problem with Cron Job and WP plugin

Discussion in 'PHP' started by ColorWP.com, Oct 23, 2007.

  1. #1
    I don't know if it's the best category here, but I don't know where else should I have posted it.

    So I am using SmartRSS plugin for Wordpress, which fetches RSS feed items and posts them in a Wordpress blog. The file that needs to be run is wp_smartrss.php which is placed in the root of the blog. Specifically to my blog it's found here:

    http://myspace.unbanyoutube.info/wp_smartrss.php

    The problem is that I set a cron job to run it every 15 minutes, but I get errors for the job. Maybe I'm messing something with the paths.

    If I set up this command:
    /myspace/wp_smartrss.php
    I get this error:
    /bin/sh: /myspace/wp_smartrss.php: No such file or directory
    PHP:
    If I set up this path:
    /home/mrgee/public_html/myspace/wp_smartrss.php
    I get:
    /home/mrgee/public_html/myspace/wp_smartrss.php: line 1: ?php: No such file or directory
    /home/mrgee/public_html/myspace/wp_smartrss.php: line 2: /*: No such file or directory
    /home/mrgee/public_html/myspace/wp_smartrss.php: line 3: Plugin: command not found
    /home/mrgee/public_html/myspace/wp_smartrss.php: line 4: Plugin: command not found
    /home/mrgee/public_html/myspace/wp_smartrss.php: line 5: Description:: command not found
    /home/mrgee/public_html/myspace/wp_smartrss.php: line 6: Version:: command not found
    /home/mrgee/public_html/myspace/wp_smartrss.php: line 7: Author:: command not found
    /home/mrgee/public_html/myspace/wp_smartrss.php: line 8: Author: command not found
    /home/mrgee/public_html/myspace/wp_smartrss.php: line 9: access-logs/: is a directory
    /home/mrgee/public_html/myspace/wp_smartrss.php: line 10: syntax error near unexpected token `'wp-config.php''
    /home/mrgee/public_html/myspace/wp_smartrss.php: line 10: `require_once('wp-config.php');'
    PHP:
    But if I run the file throug my browser:
    http://myspace.unbanyoutube.info/wp_smartrss.php
    It works.

    What path should I enter to be able to run the cron job correctly?
     
    ColorWP.com, Oct 23, 2007 IP
  2. theOtherOne

    theOtherOne Well-Known Member

    Messages:
    112
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    108
    #2
    Hi,

    suppose it would work with either
    wget http://myspace.unbanyoutube.info/wp_smartrss.php
    Code (markup):
    or, much better:
    php /home/mrgee/public_html/myspace/wp_smartrss.php
    Code (markup):
    Oh, and by the way, thanks for the name of the plugin. Was looking for that recently ;)
     
    theOtherOne, Oct 23, 2007 IP
  3. ColorWP.com

    ColorWP.com Notable Member

    Messages:
    3,120
    Likes Received:
    100
    Best Answers:
    1
    Trophy Points:
    270
    #3
    I will try this now.
    PS: It's a great plugin for automated blogs. :)
     
    ColorWP.com, Oct 23, 2007 IP