Script executes successfully in commandline but not as a cronjob

Posted by JasonOng on Stack Overflow See other posts from Stack Overflow or by JasonOng
Published on 2010-03-08T01:00:56Z Indexed on 2010/03/08 3:29 UTC
Read the original article Hit count: 440

Filed under:
|
|
|

I've a bash script that runs a ruby script that fetches my twitter feeds.

## /home/username/twittercron

#!/bin/bash

cd /home/username/twitter
ruby twitter.rb friends

It runs successfully in command line.

/home/username/twittercron

But when I try to run it as a cronjob, it ran but wasn't able to fetch the feeds.

## crontab -e

*/15 * * * * * /home/username/twittercron

The script has been chmod +x. Not sure why it's as such. Any ideas?

© Stack Overflow or respective owner

Related posts about cron

Related posts about cronjob