mardi 13 octobre 2015

AWS Centos 6.7 cron job scrapy crawl not working

I have this following bash script in an AWS Centos instance:

scrape.sh

#!/bin/bash

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

cd /
cd /myproject

source env/bin/activate

scrapy crawl my_spider -o "/path/to/json/folder/my.json" -t json

This script works when I manually type: (the bash script is also in my project folder)

sh /myproject/scrape.sh

But my crontab job doesn't work... I've looked through every suggestion but it still doesn't work

0 * * * * sh /myproject/scrape.sh




Aucun commentaire:

Enregistrer un commentaire