mdedens Posted June 3, 2005 Posted June 3, 2005 Hi Google released a SiteMap Generator built in Python. But they don't say how to connect to your server to run the script. I uploaded it to my public html folder. But I have no idea how to connect to the server via Command Line to execute the script. Any ideas how to do this? Here's a link to the Google page: google.com/webmasters/sitemaps/docs/en/sitemap-generator.html -Mike Quote
TweezerMan Posted June 3, 2005 Posted June 3, 2005 "Connecting to the server via command line" is what's known as a shell, and shell access is not allowed on TCH servers. You'd need to follow the next suggestion ("Setting up a recurring script") by setting up the script to run as a cron job. Quote
mdedens Posted June 4, 2005 Author Posted June 4, 2005 (edited) Sorry, had 1 more question. I think I get how to setup a cron job in the cpanel. But is there a special directory I need to put the Python script in? Like python or cron dir? Or just my public html folder? Thanks for any advice. Mike Edit Here is the command I am supposed to run, if it helps. And I think I'm supposed to replace "path" with the root path to config.xml $ python sitemap_gen.py --config=/path/config.xml Edited June 4, 2005 by mdedens Quote
TweezerMan Posted June 4, 2005 Posted June 4, 2005 I don't believe it matters what directory you put the python script in. You could put in your /public_html directory, or even a subdirectory of /public_html. Here is the command I am supposed to run, if it helps. And I think I'm supposed to replace "path" with the root path to config.xml >$ python sitemap_gen.py --config=/path/config.xml Yes, you need to use an absolute file path to the config.xml file, as well as to the sitemap_gen.py file. Your cron command should look something like this: >python /home/cpanelName/public_html/sitemap_gen.py --config=/home/cpanelName/public_html/config.xml ...assuming config.xml and sitemap_gen.py are in your /public_html directory. Replace 'cpanelName' with your actual CPanel username. Hope this helps... Quote
ThatAdamGuy Posted June 4, 2005 Posted June 4, 2005 I'm interested in participating in the new Google sitemap project, and using their Site Map Generator. Would it be possible to run this python script via cPanel? Quote
ThatAdamGuy Posted June 4, 2005 Posted June 4, 2005 Ah, nevermind... (my topic was merged)... and I should have noticed the earlier query and responses. Thanks, David, for the informative replies! Quote
ohpul Posted July 6, 2005 Posted July 6, 2005 I'm sorry, but I am a little bit less savvy with programming. How can I set up a cron job in CPanel? Quote
ohpul Posted July 6, 2005 Posted July 6, 2005 Ah, nevermind. Setting up a cron job through cPanel is the easiest thing. It's late and the A/C in my office is broken... Thanks for reading. Quote
TCH-Rob Posted July 6, 2005 Posted July 6, 2005 Lol, Glad you got it sorted out ohpul and welcome to the forums. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.