If that's root's crontab (edited with
sudo crontab -u root -e or
su -c 'crontab -u root -e' or similar), then
./twitter/twitter.py will run every hour. If this is the system crontab (
/etc/crontab), a sixth field is needed after the asterisks:
0 * * * * root …. I recommend using the root user's crontab and leaving the system crontab to the system.
./twitter/twitter.py starts from the current directory. Cron can't guess what you want the current directory to be: you never told it. Change this to use the absolute path to the script, e.g.
You'll need to make sure that
twitter.py starts with
#!/usr/bin/env python (I'm assuming it is a Python script) and that
python is in cron's default
PATH (this will depend on your brand of unix; you can be sure that
/usr/bin is in the default
PATH, but if your
python lives elsewhere such as
/usr/local/bin, you may need to add a line like
PATH=/usr/local/bin:/bin:/usr/bin at the top of the crontab).
Also make sure that the script is executable (
chmod +x …/twitter.py).