Scrapy scheduled task under centos, cannot be executed

clipboard.png

clipboard.png
execute after entering the project, the error shows scrapy command not found
, but I-sharpscrapy can be run, the scrapy crawl test crawler command can also be executed alone,
only the scheduled command will appear scrapy:command not found


The environment variables of

crontab are different from our accounts and root.
similar to ordinary users will first load ~ / .bashrc or / etc/profile , while crontab will load / etc/crontab to import their environment variables at run time.
so see if the command scrapy has been added to the crontab environment variables: / etc/crontab . < /

in fact, the easiest way is to use the absolute path when performing scheduled tasks in crontab:

2 2 *** cd /root/EIT/crawler/EIT && /path/to/scrapy crawl test

if you don't know where the scrapy command is, you can find the path by executing the following two commands:

  

is awesome. Thank you, boss!

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1beb7aa-39e2b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1beb7aa-39e2b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?