Wednesday 15 May 2013

ubuntu - Scrapy crawler in Cron job -


I want to execute my scary crawler with cron jobs.

I create the Bash file getdata.sh where the scamp project is located with its spiders

  #! / Bin / bash cd / myfolder / crawlers / scrapy crawl my_spider_name   

My cronet looks like this, I want to execute it every 5 minutes

  * / 5 * * * * sh /myfolder/crawlers/getdata.sh   

But it does not work, what's wrong, where's my fault?

When I execute my Bash file from Terminal sh /myfolder/crawlers/getdata.sh, it works fine

I solved this problem in the Bash file

  #! / Bin / bash CD / MyFolder / Crawlers / Path = $ PAT: / usr / local / bin export path scary crawl my_spider_name    

No comments:

Post a Comment