February 21, 2008

wp-o-matic cron install problem

Posted in Linux, Open Source, wordpress tagged , , , , , , at 2:57 am by ilanco

WP-o-Matic is a cool auto-blogging plugin for wordpress.

After installation you’ll have to change cron.php if you want to use automatic feed fetching via crontab.

  1. take note of the code wp-o-matic will give you on installation.
  2. open cron.php in your favorite editor
  3. add this piece of code after the <?php opening tag :
    if ($argc > 0)
    {
    for ($i=1;$i < $argc;$i++)
    {
    parse_str($argv[$i],$tmp);
    $_REQUEST = array_merge($_REQUEST, $tmp);
    }
    }
  4. fire up crontab -e and add something like the following line to it :
    */20 * * * * php /DIR_TO_WP/wp-content/plugins/wp-o-matic/cron.php code=YOURCODE
    change DIR_TO_WP with you path to wordpress and YOURCODE with the code you noted in step 1
  5. Save the file and cron will run your fetcher every 20 minutes.
  6. You’re done, go add some rss feeds.

28 Comments »

  1. Clark said,

    It didn’t work for me.

  2. linuxil said,

    do you get an error message in the wp-o-matic log ?
    Post your line in crontab (change the code:)

  3. Clark said,

    No errors in the log.


    # m h dom mon dow command
    */20 * * * * /home/clark/www.hart411.com/wp-content/plugins/wp-o-matic/cron.php?code=XXXXXXXX

    The **** and the /path/ all display on one line in nano.

  4. linuxil said,

    you should seperate the parameter(s) by space.
    So your cron line should look like this :

    */20 * * * * /home/clark/www.hart411.com/wp-content/plugins/wp-o-matic/cron.php code=XXXXXXXX

    on one line 🙂

    good luck!

  5. Wayne said,

    Thanks, it fixed my cron error. Good job!

  6. jgip said,

    Hello Linuxil,
    I’m trying to configure wpomatic cron in my WP blog following your instructions, but i don’t know how to open the crontab, where do I type “crontab -e” ?

    Thank you

  7. linuxil said,

    hi jgip,

    if you have a shared hosting, try looking for “cron” or “crontab” in the control panel. If you have shell access, just type `crontab -e` on the command line and you will be presented with an editor.

    Good luck!

  8. Retsi said,

    When I setup the wp-o-matic there is PHP error message:

    Warning: is_executable() [function.is-executable]: open_basedir restriction in effect. File(/sbin/php.exe) is not within the allowed path(s): (/home/:/usr/lib/php:/tmp) in /home/a9247137/public_html/wp-content/plugins/wp-o-matic/inc/tools.class.php on line 72

  9. linuxil said,

    Retsi,

    seems your hosting has some restrictions set on php that will not allow wp-o-matic to function properly.
    I would try contacting them with the error and see where it goes..

    Good luck.

  10. Bryan said,

    Ok, awesome. Seems everything works now except. WP-o-Matic shows that the next automatic feed check will run in 6h 55m and under options I have set the frequency to 1h 0m — is this a bug?

  11. Bryan said,

    I’ve tried all this, but I’m getting an file not found error:

    php /home/cerosllc/public_html/www/wp-content/plugins/wp-o-matic/cron.php?code=78fdff56
    Could not open input file:
    /home/cerosllc/public_html/www/wp-content/plugins/wp-o-matic/cron.php?code=78fdff56

    /home/cerosllc/public_html/www/wp-content/plugins/wp-o-matic/cron.php?cod
    e=78fdff56
    -bash: /home/cerosllc/public_html/www/wp-content/plugins/wp-o-matic/cron.php?code=78fdff56: No such file or directory

    I’m running this from command line with php and without…

    Help!

  12. Bryan said,

    I just noticed the “?” mark between cron.php and code. I removed this and now I’m getting a permission denied.

    I cut and pasted this from the wp-o-matic setting page.

  13. Bryan said,

    Nevermind, I found it.

    Permission denied, was caused by running this without php.

  14. linuxil said,

    Hi Bryan,

    Try to replace the ? after cron.php with a space …
    Check out point number 4 in the post for an example.

    Good luck.

  15. Moazam said,

    Thanks so much it solved my problem!

  16. Mike said,

    Thanks for the good info. I have been trying and trying to get the cron to work and now it does.

    I then had a problem with posts not being posted. So I found this article – http://pixca.net/blog/code-programming/wp-o-matic-cron-job-done-but-no-campaigns-processed/

    which helped me through that problem. It APPEARS that all is working now.

    Fingers are crossed.

  17. tobe said,

    Hi there,

    tried your suggestion with no luck. The wp-o-matic log shows that a cron job was done, but there weren’t any campaigns proccessed. “Next campaigns to process” show NEXT! on the campaigns, but they aren’t fetched. Any idea what could be wrong here?

    Regards,
    tobe

  18. jared said,

    hey guys my cron jobs run…. but ti doesnt fetch anything… what am I missing…. ? i checked all the feeds and they are changed… the only way i can fetch is to manually fetch each one from the campaign tab

  19. norman said,

    I get email from cron every 20 minutes, how do i stop it from emailing each time it runs?

  20. gazouteast said,

    Just noticed these issues (it helps to have multiple blogs)

    Upgrading WP and reactivating wp-o-matic causes the trailing code to change

    Upgrading wp-o-matic causes the trailing code to change

    It then needs the trailing code changed in the cron job

    Dunno if it’ll help anyone, or if you’re all aware of it already?

    Gaz

  21. Kyle said,

    I am not able to get the cron jobs to run. I have no experience with these things so I have included the email response I got from the failed cron job. I’m have no idea why it generates the html code. If can tell me why it would not be able to find the file (yes it is where it is supposed to be) that would be great.
    ———
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed

    100 598 100 598 0 0 12314 0 –:–:– –:–:– –:–:– 12314
    100 598 100 598 0 0 12301 0 –:–:– –:–:– –:–:– 0

    curl: (6) Couldn’t resolve host ‘code=282a1f6f’

    406 Not Acceptable

    Not Acceptable
    An appropriate representation of the requested resource /barack-obama/wp-content/plugins/wp-o-matic/cron.php could not be found on this server.
    Additionally, a 404 Not Found
    error was encountered while trying to use an ErrorDocument to handle the request.

    Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.8b mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at total-information.com Port 80

    ——-

  22. wpwebtools said,

    Hello! Thanks for this. I wonder what does “Warning! cron.php was called with the wrong password or without one!” message in my wp o matic dashboard means? Any idea?

  23. psypo said,

    Why not use Yaab autoblogger ,….its far better tahn wp-o-matic and has no issue with cron…everything is built in

  24. Dereck said,

    I changed the code and now I’m waiting for cron activity.

  25. gladys said,

    I added the script; set up the cron job properly, created the cache folder and enable permissions.

    It appears on wp-o-matic as is processing but is not fetching automatically.
    Any other clue?

    We will all appreciate!!!!!

    Thank you

  26. Monica said,

    I did as u said, but i got this e-mail massage from cronjob:
    Cache-Control: no-cache, must-revalidate, max-age=0
    Pragma: no-cache

    I have a folder called cache in the directory wp-o-matic, so what cuold be the problem ?

    Thank you

  27. mike said,

    Thanks for the advice.

    My problem is that I have organised the WP O Matic into multiple campaigns. If I try to run the Cron it times out before all the campaigns are finished.

    Is it possible to fetch for just one campaign using Cron?

  28. Marius said,

    anyone has any idea why the pseud-cron is not disabled? i’m trying for a week now and found no solution on how to disable the wpo queries on each page load.

    any help is much appreciated.


Leave a reply to Bryan Cancel reply