How do I create a cron job that will run everyday at 12:20am?
The crontab entry should look like:
20 0 * * * /usr/bin/ruby /Users/tamer/scripts/sftp.rb
This assumes that you don't need any other environment variables to make it all work. If you do need other variables, then create an environment-setting shell script which then executes the Ruby program and script.
To submit the job, I usually use:
crontab -l > x3echo "20 0 * * * /usr/bin/ruby /Users/tamer/scripts/sftp.rb" >> x3crontab < x3rm x3