<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Creating a Django cron job</title>
	<atom:link href="http://slowchop.com/2006/09/17/creating-a-django-cron-job/feed/" rel="self" type="application/rss+xml" />
	<link>http://slowchop.com/2006/09/17/creating-a-django-cron-job/</link>
	<description></description>
	<pubDate>Wed, 03 Dec 2008 07:02:15 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
		<item>
		<title>By: Mike Kibbel</title>
		<link>http://slowchop.com/2006/09/17/creating-a-django-cron-job/#comment-1105</link>
		<dc:creator>Mike Kibbel</dc:creator>
		<pubDate>Sat, 17 Nov 2007 05:13:18 +0000</pubDate>
		<guid isPermaLink="false">http://slowchop.com/2006/09/17/creating-a-django-cron-job/#comment-1105</guid>
		<description>To solve this problem in a robust way, I've extended the method described by Jared Kuolt: http://superjared.com/entry/django-and-crontab-best-friends/.  My technique lets you set up the Django environment in your cron job using one line of code without having to type in any long incantations or paths.  Check it out and download my reusable script at http://blog.capstrat.com/articles/making-django-environmentally-friendly/</description>
		<content:encoded><![CDATA[<p>To solve this problem in a robust way, I&#8217;ve extended the method described by Jared Kuolt: <a href="http://superjared.com/entry/django-and-crontab-best-friends/" rel="nofollow">http://superjared.com/entry/django-and-crontab-best-friends/</a>.  My technique lets you set up the Django environment in your cron job using one line of code without having to type in any long incantations or paths.  Check it out and download my reusable script at <a href="http://blog.capstrat.com/articles/making-django-environmentally-friendly/" rel="nofollow">http://blog.capstrat.com/articles/making-django-environmentally-friendly/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gerald Kaszuba</title>
		<link>http://slowchop.com/2006/09/17/creating-a-django-cron-job/#comment-1031</link>
		<dc:creator>Gerald Kaszuba</dc:creator>
		<pubDate>Tue, 29 May 2007 23:12:45 +0000</pubDate>
		<guid isPermaLink="false">http://slowchop.com/2006/09/17/creating-a-django-cron-job/#comment-1031</guid>
		<description>&lt;blockquote&gt;Heh, fixed the problem almost immediately after asking for help. Isn’t that always the way?&lt;/blockquote&gt;

Yes, it's happened to me countless times!</description>
		<content:encoded><![CDATA[<blockquote><p>Heh, fixed the problem almost immediately after asking for help. Isn’t that always the way?</p></blockquote>
<p>Yes, it&#8217;s happened to me countless times!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arthur McLean</title>
		<link>http://slowchop.com/2006/09/17/creating-a-django-cron-job/#comment-1030</link>
		<dc:creator>Arthur McLean</dc:creator>
		<pubDate>Tue, 29 May 2007 19:34:14 +0000</pubDate>
		<guid isPermaLink="false">http://slowchop.com/2006/09/17/creating-a-django-cron-job/#comment-1030</guid>
		<description>Heh, fixed the problem almost immediately after asking for help. Isn't that always the way? I just added:
sys.path.append("../")
That way the import worked fine. Perhaps this will be helpful to someone.</description>
		<content:encoded><![CDATA[<p>Heh, fixed the problem almost immediately after asking for help. Isn&#8217;t that always the way? I just added:<br />
sys.path.append(&#8221;../&#8221;)<br />
That way the import worked fine. Perhaps this will be helpful to someone.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arthur McLean</title>
		<link>http://slowchop.com/2006/09/17/creating-a-django-cron-job/#comment-1029</link>
		<dc:creator>Arthur McLean</dc:creator>
		<pubDate>Tue, 29 May 2007 19:26:58 +0000</pubDate>
		<guid isPermaLink="false">http://slowchop.com/2006/09/17/creating-a-django-cron-job/#comment-1029</guid>
		<description>I've tried following the steps outlined here and am getting an error. If I set os.environ['DJANGO_SETTINGS_MODULE'] = 'settings', I get the error:
ImportError: No module named mytestproject

I've also tried with mytestproject.settings and get:
EnvironmentError: Could not import settings 'mytestproject.settings' (Is it on sys.path? Does it have syntax errors?): No module named mytestproject.settings

I'm curious if I'm missing something obvious such as where the python script should go? I put my script in the same folder as settings.py. Is that correct?</description>
		<content:encoded><![CDATA[<p>I&#8217;ve tried following the steps outlined here and am getting an error. If I set os.environ['DJANGO_SETTINGS_MODULE'] = &#8217;settings&#8217;, I get the error:<br />
ImportError: No module named mytestproject</p>
<p>I&#8217;ve also tried with mytestproject.settings and get:<br />
EnvironmentError: Could not import settings &#8216;mytestproject.settings&#8217; (Is it on sys.path? Does it have syntax errors?): No module named mytestproject.settings</p>
<p>I&#8217;m curious if I&#8217;m missing something obvious such as where the python script should go? I put my script in the same folder as settings.py. Is that correct?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kestrel</title>
		<link>http://slowchop.com/2006/09/17/creating-a-django-cron-job/#comment-22</link>
		<dc:creator>kestrel</dc:creator>
		<pubDate>Mon, 18 Sep 2006 08:48:06 +0000</pubDate>
		<guid isPermaLink="false">http://slowchop.com/2006/09/17/creating-a-django-cron-job/#comment-22</guid>
		<description>If a module_name is not a "top-level" module you'll need to use the following hack:


&lt;blockquote&gt;
module = __import__(module_name, globals(), locals(), [''])
getattr(module, function_name)()
&lt;/blockquote&gt;
</description>
		<content:encoded><![CDATA[<p>If a module_name is not a &#8220;top-level&#8221; module you&#8217;ll need to use the following hack:</p>
<blockquote><p>
module = __import__(module_name, globals(), locals(), [''])<br />
getattr(module, function_name)()
</p></blockquote>
]]></content:encoded>
	</item>
	<item>
		<title>By: kestrel</title>
		<link>http://slowchop.com/2006/09/17/creating-a-django-cron-job/#comment-21</link>
		<dc:creator>kestrel</dc:creator>
		<pubDate>Sun, 17 Sep 2006 21:45:23 +0000</pubDate>
		<guid isPermaLink="false">http://slowchop.com/2006/09/17/creating-a-django-cron-job/#comment-21</guid>
		<description>You might try this instead of those exec\'s...

&lt;blockquote&gt;
module = __import__(module_name)
getattr(module, functio_name)()
&lt;/blockquote&gt;</description>
		<content:encoded><![CDATA[<p>You might try this instead of those exec\&#8217;s&#8230;</p>
<blockquote><p>
module = __import__(module_name)<br />
getattr(module, functio_name)()
</p></blockquote>
]]></content:encoded>
	</item>
</channel>
</rss>
