Support » Fixing WordPress » Help with a cron job

  • Resolved zombiitv


    I have not been able to get a cron job to work with WordPress. I have a php file that is pulling a lot of data off three separate databases, compiling it and then creating a post from all the info. The problem is that when I use “include(“../wp-load.php”);” it kills my cron job.

    as a test I have the following code

    echo “start”;
    echo “finished”;

    When I run it in my browser, I get “startfinished” when I run it with cron, I get “start”

    anybody know why loading wp-load.php is stopping my cron job?

    As a side note, I usually get an error sent to me, but with the above code I get nothing.

    Here’s the cron call (using a cPanel)
    /ramdisk/bin/php5 -c /home/zombiitv/publc_html/php.ini -q /home/zombiitv/public_html/ut/php/autopostAgent.php

    I’m using specific php.ini file to increase the memory and the time limits.

    Any help would be appriciated


Viewing 5 replies - 1 through 5 (of 5 total)
  • Probably, ../ is a wrong path?..




    if you add debugging info to that you will get your answer. dor put you on the right track.

    I have the sneaky suspicion this is a paid gig for you .. hence my silence (i googled your name here)

    also, for what its worth, EVERY decent web host has wget installed. You should be using that instead of the command line PHP interpreter.

    That will also solve your problem.

    I added this to the cron line “> cronjob.log 2>&1” to try and get some debugging – is this right? Not very familiar with cron jobs yet.

    I’ll look into the wget

    I don’t understand your comment on this being a paid gig for me – what does that mean?




    I try to avoid answering questions for folks where theyre getting paid.

    theres NO rule, youre not doing anything wrong by posting — its just a peeve of mine that folks come here ‘not knowing how to do things, suck the knowledge out of people that are doing crap for free, and then turn around and pass it off as their own’ (generally speaking).

    Sometimes Im wrong in my appraisals of folks. You, I googled. The realty sites I found gave it away (for me).

    use wget.

    wget worked – thank you

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Help with a cron job’ is closed to new replies.