Google Sitemaps Cron Job

I've recently set up a cron job to run the Google Sitemaps Python Script automatically each day. This automatically notifies Google of any changes to the site. I've found that new pages are being indexed very quickly.

There are plenty of good articles out there about how to use the script provided by Google but I struggled to find information on how to set up the cron job for the task.

So in case anyone else needs it here's a cron job that works for me on Unix. You need to make sure you specify absolute paths. If you don't have root access then talk to your host but they should tell you where python resides. If you want to find out your document root you can find this in PHP by using the phpinfo() function.

This runs the scheduled task of generating a sitemap each day at 6am.

0 6 * * * /enter/your/path/to/python /enter/your/path/to/sitemap_gen.py --config=/enter/your/path/to/example_config.xml

Have your say

Post details

21st June 2006

0 Comments

What's this?

This is a journal entry written by George Ornbo, a web designer who lives and works in London, England.

Subscribe

Journal articles by RSS

Journal articles by Email

Recommended Links by RSS

Participating / Attending

Inclusive New Media Design

dConstruct 2008 - Designing the Social Web

Member of the 9 Rules Network Media Temple