擅长:python、mysql、java
<p><code>cron</code>不读取rc shell文件,因此需要定义环境变量PYTHONPATH以包括<code>apps</code>包的位置以及脚本所需的所有其他模块文件。在</p>
<pre><code>PYTHONPATH=/usr/local/lib/python2.7:/usr/lib/python2.7
*/2 * * * * /usr/local/bin/python2.7 /home/nezap/webapps/bonzer/bonzer/apps/base/alert.pyr
</code></pre>