Skip to content

Instantly share code, notes, and snippets.

@vladimirtsyupko
Created April 17, 2014 08:31
Show Gist options
  • Save vladimirtsyupko/10964740 to your computer and use it in GitHub Desktop.
Save vladimirtsyupko/10964740 to your computer and use it in GitHub Desktop.
Scrapy + cron
touch script
chmod 777 script
nano script
Put this to script “
#!/bin/bash
export PATH="/usr/local/bin:/usr/bin:/bin"
cd `dirname $0`
exec "$@"
env EDITOR=nano crontab -e
Put this to cron file "
*/1 * * * * /absolute/path/to/script/ command arg1 arg2 > /absolute/path/to/log
"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment