WordPress.org

Ready to get started?Download WordPress

Forums

Google XML Sitemaps
cPanel Cron Job Doesnt Work (21 posts)

  1. habboubih
    Member
    Posted 3 years ago #

    Hello,

    I've been experiencing CPU overload because of the huge number of posts that Google XML Sitemaps is creating using the built-in cron.

    I wanted to switch the built-in cron into using the cPanel cron instead.

    So I pasted the provided URL from the setting page into the cron job but I receive the following error:

    /bin/sh: http://www.xxxx.com/?sm_command=build: No such file or directory.

    Any help ?

  2. habboubih
    Member
    Posted 3 years ago #

    I also have this error on Google Webmaster tools

    Your Sitemap exceeds the maximum file size limit. Please create multiple Sitemaps containing fewer URLs to meet the file size limit.

    Can I split the sitemap into multiple sitemaps ?

  3. webjunk
    Member
    Posted 3 years ago #

    You will have to split it yourself. You can try one of my scripts for that.
    Let me know if it does what you need. Should be at:
    http://webjunkdemo.com/downloads/splitsitemap.zip

  4. habboubih
    Member
    Posted 3 years ago #

    What about the first issue ?

  5. webjunk
    Member
    Posted 3 years ago #

    Sorry forgot about that one.
    If that is the correct command line (Never tried!) then you would need to invoke lynx or another browser that can run from the command line.
    You would need to run something like
    lynx -dump "http://www.xxxx.com/?sm_command=build:"
    and you may need to put that in a shell script depending on your host. Also you might want to redirect the output to /dev/nul
    Do not see how that would help with CPU time or memory. Just a change in where i is invoked from. You might need to increase one.

  6. habboubih
    Member
    Posted 3 years ago #

    Thank you. I'ma give it a try...

  7. chshahid2k
    Member
    Posted 3 years ago #

    yes i m having the same problem i dont want to run the built in cron at the time of post .. instead of that i want it to run through cpanel cron jobs. i have added the interval of 6 hours. so cron runs 4 times a day(24 hours). but it keeps saying the same thig as the topic starter posted
    this is what i have mentioned in cron job panel to run

    http://www.mysite.com/?sm_command=build&sm_key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

    and im recieving this email on running crons

    /bin/sh: http://www.mysite.com/?sm_command=build: No such file or directory

    can anybody help?

  8. webjunk
    Member
    Posted 3 years ago #

    @chshahid2k
    Did you bother to read what I wrote above?

  9. chshahid2k
    Member
    Posted 3 years ago #

    these inverted commas("") are important around the url?

    and which url do i need to paste the one u have used or the complete with smkey

    eg:

    http://www.mysite.com/?sm_command=build&sm_key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  10. webjunk
    Member
    Posted 3 years ago #

    @chshahid2k
    With the quotes:

    lynx -dump "http://mysite.com/?sm_command=build&sm_key=xxxxxxxxx"

    Remember!!! You must set in the XML Sitemap Generator settings 'Enable manual sitemap building via GET Request' to True or it will never work!

  11. chshahid2k
    Member
    Posted 3 years ago #

    yes im already enabled it., I am using a Mutual/Shared webhosting and. I guess my host does not allow it. this is what im getting now

    email subject:
    Cron <mysite@server19> lynx -dump "http://www.mysite.com/?sm_command=build&sm_key=xxxxxxxxxxxxxxxxxxxxxxxxx"

    email body:
    /bin/sh: /usr/bin/lynx: Permission denied

  12. webjunk
    Member
    Posted 3 years ago #

    Contact your hosting company. Looks like they may not allow lynx (for security reasons) but possibly curl or wget. In some cases you may not be able to run lynx diretly from a cron job but will have to put the command in a shell script. They are the ones who can tell you.

  13. chshahid2k
    Member
    Posted 3 years ago #

    i guess im even unable to use 'wget' . i have tried this few days back with the plugin 'wp o matic' and i was getting the same error (permission denied)

    email subject:
    Cron <myweb@server19> wget http://www.myweb.com/wp-content/plugins/wp-o-matic/cron.php?code=xxxxxxx

    email body:
    /bin/sh: /usr/bin/wget: Permission denied

  14. webjunk
    Member
    Posted 3 years ago #

    Have you contacted your hosting company? They are the only ones who can give you direction on what you CAN do. It does not matter what you can not do. If there is no options you are probably with the wrong hosting ompany.

  15. chshahid2k
    Member
    Posted 3 years ago #

    one more thing i have noticed and wanna ask

    im saving sitemap file in a folder. path to my sitemap file is

    mysite.com/sitemaps/sitemaps.xml
    mysite.com/sitemaps/sitemaps.xml.gz

    both file have CHMOD 755 and the folder has also the permission of 755

    this could be a reason that sitemaps are not being generated by GET request?
    they are being generated by auto in this mode but i have just this thing in my head that it might be the problem that these are not generated by GET/Cron request

  16. chshahid2k
    Member
    Posted 3 years ago #

    one more thing i have noticed and wanna ask

    im saving sitemap file in a folder. path to my sitemap file is

    mysite.com/sitemaps/sitemaps.xml
    mysite.com/sitemaps/sitemaps.xml.gz

    both file have CHMOD 755 and the folder has also the permission of 755

    this could be a reason that sitemaps are not being generated by GET request?
    they are being generated by auto in this mode but i have just this thing in my head that it might be the problem that these are not generated by GET/Cron request

  17. webjunk
    Member
    Posted 3 years ago #

    Why are you saving into a differnet directory? Do you have the sitemap listed in robots.txt? Or else those sitemaps are useless. They are expected in the root. Would never do that.

  18. chshahid2k
    Member
    Posted 3 years ago #

    oh then what should i do now? move them to the root and change the path in plugin settings as well?

    i put them in a new directory coz it was asking that it needs 777 permission for the directory i thought its better to put them in a sub directory

  19. webjunk
    Member
    Posted 3 years ago #

    No sitemap generator ever needs extended permissions for the directory. Only the sitemap Files need to have 666 as permissions. Every SE and spider expects the sitemaps in the root. If they are moved they can only find them if there is a line in the robots.txt specifying their location but that is not the most reliable either.

  20. chshahid2k
    Member
    Posted 3 years ago #

    thanks for the info
    now what should i do? should i move my existing sitemap file to the root directory? or i have to create a new file in the root directory?

  21. webjunk
    Member
    Posted 3 years ago #

    I am writing suggestions but you never respond to them. The main thing being you need to contact your hosting company. AM considering this closed as I asked twice and that is where the problem lies.

  22. habboubih
    Member
    Posted 3 years ago #

    Just a quick suggestion,

    Why not adding the option where the plugin splits the sitemap automatically just like vbulletin 4.xx

    It will be easy to manage and lower Google sitemap error.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic