First use "which scrapy " to find where the scrapy is. For my machine the scrapy is:
/home/ubuntu/anaconda2/bin/scrapy
Then in the shell script, write:
cd /path/to/spider
nohup /home/ubuntu/anaconda2/bin/scrapy crawl quotes >> log.txt &
It resolved the problem. Or can write:
cd /path/to/spider
PATH=$PATH:/home/ubuntu/anaconda2/bin
export PATH
nohup /home/ubuntu/anaconda2/bin/scrapy crawl quotes >> log.txt &
No comments:
Post a Comment