Command Line For Google Sitemap

Hi<br /><br />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?<br /><br />Here's a link to the Google page:<br /><br />google.com/webmasters/sitemaps/docs/en/sitemap-generator.html<br /><br />-Mike<!--content-->
"Connecting to the server via command line" is what's known as a shell, and shell access is not allowed on TCH servers.<br /><br />You'd need to follow the next suggestion ("Setting up a recurring script") by setting up the script to run as a cron job.<!--content-->
Ok, thanks for the tip!<!--content-->
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?<br /><br />Thanks for any advice.<br /><br /><br />Mike<br /><br />Edit<br /><br />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<br /><br />$ python sitemap_gen.py --config=/path/config.xml<!--content-->
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.<br /><br /><!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->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<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->$ python sitemap_gen.py --config=/path/config.xml<!--c2--></div><!--ec2--><!--QuoteEnd--></div><!--QuoteEEnd--><br />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:<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->python /home/cpanelName/public_html/sitemap_gen.py --config=/home/cpanelName/public_html/config.xml<!--c2--></div><!--ec2--><br />...assuming config.xml and sitemap_gen.py are in your /public_html directory. Replace 'cpanelName' with your actual CPanel username.<br /><br />Hope this helps...<!--content-->
I'm interested in participating in the new Google sitemap project, and using their <a href="https://www.google.com/webmasters/sitemaps/docs/en/sitemap-generator.html" target="_blank">Site Map Generator</a>.<br /><br />Would it be possible to run this python script via cPanel?<!--content-->
Ah, nevermind... (my topic was merged)... and I should have noticed the earlier query and responses. Thanks, David, for the informative replies!<!--content-->
Thanks David it works!<!--content-->
I'm sorry, but I am a little bit less savvy with programming. How can I set up a cron job in CPanel?<!--content-->
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.<!--content-->
Lol,<br /><br />Glad you got it sorted out ohpul and welcome to the forums.<!--content-->
Welcome to the forums, ohpul! <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/thumbup1.gif" style="vertical-align:middle" emoid=":thumbup1:" border="0" alt="thumbup1.gif" /><!--content-->
Welcome to the forums, ohpul! <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><!--content-->
Welcome to the forums, ohpul <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /><!--content-->
welcome to the forums <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><!--content-->
Welcome to the forum, ohpul. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><!--content-->
 
Top