Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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!

share|improve this question

2 Answers 2

up vote 1 down vote accepted


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

I know this is an old post but to get mine to work I also needed to add a path variable. Otherwise cron may not be able find scrapy. For me it was: PATH=/usr/local/bin Just locate the scrapy binary and add the path variable to a location before the cronjob in the file. I usually use crontab -e to edit the cronjob list. But utilities like webmin can also do this.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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