Forum Moderators: phranque
It actually has little text fields for entering the minute, hour, etc. What I don't understand though is
1) the first part has a field labeled 'Mail-To:' what does it actually mail? and why would you need this?
2) The actual command part I'm not sure what to put in for it. To create a site map, or make an updated one you would normally type the following into a command line:
$ python sitemap_gen.py --config=<path/config.xml>
can I put that, just as it is as the command for the cron job?
And then with the sitemap, the way I understand it, you would then have to resubmit the new map and that can be done with an http request (according to their site: [google.com...] like:
www.google.com/webmasters/sitemaps/ping?sitemap=sitemap_url
Can that be set up then as a separate cron job to run after you create the new map? Or can you even put a url into a cron job command?
Sorry, if that is too confusing or if I am really way off with my understanding of how cron works. On Googles site they suggest doing it with a cron job, but just give a link to a google search. Which I looked at, but it was all just greek to me, so to speak. The only page that was helpful went through some examples that I learned enough now to set the date of when I want to do it, but that is about it. It's still not clear what you can and can't put in a cron job command and the format for it.
Thanks for any help!
I'm not much of an advisor on cron jobs, but can offer a couple of hints, since no-one else has answered.
First, a cron job runs a shell script (a collection of shell commands, much like a DOS .bat file) on a time schedule. The script commands vary depending on whether you're on a *nix machine or a Windows box. Anything you can type into a command prompt on the machine should be valid in a shell script, and therefore in a script run by cron.
In order to request the 'update site map' URL, you'll need to use the 'get URL' library function of any scripting language like PERL or PHP. So the shell script would include a call to run a PERL or PHP cgi script, which would then request that URL, and then either write the response to a log file or discard it. (I'm not sure what would be in the response or if it might be useful, but you have the option.)
Jim