How would I run a command like scrapy crawl empt.com in a cron job where I need to be in a specific folder to run the command for example:

/downloads/my_crawler/empt/empt/ then the command scrapy crawl empt.com

My current crontab entry looks like this: 0 */2 * * * * root /downloads/my_cralwer/empt/empt/ scrapy crawl empt.com Thanks!

link|improve this question
feedback

1 Answer

up vote 0 down vote accepted

Try:

0 */2 * * * * root cd /downloads/my_cralwer/empt/empt/ && scrapy crawl empt.com
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.