instead of cd /path/to/phpdig/ use cd /path/to/phpdig/admin/ /usr/local/bin/php -q -f ./spider.php http://www.yoursite.com