webfaction中使用crontab与安装python包
继续感冒中…… 实在睡不着了,把我的这个脚本移到webfaction,放到crontab里了。 设置PYTHONPATH和PATH环境变量 [notsobad@web108 ~]$ cat .bashrc # .bashrc # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi # User specific aliases and functions export PYTHONPATH=$PYTHONPATH:$HOME/script/python-lib export PATH=$PATH:$HOME/script/bin 然后就可以使用easy_install了,我要安装feedparser: easy_install --install-dir=$HOME/script/python-lib --script-dir=$HOME/script/bin feedparser crontab的使用: crontab -e 直接编辑即可,注意crontab使用的环境变量和登录用户使用的是不一样的,要使用自定义的pythonpath的话,需要自己指定 ...