February 02, 2014, 01:30:22 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
   Home   Help Search Login Register  
Pages: [1]
Author Topic: sync from cron - ruby: command not found  (Read 2644 times)
Posts: 11

View Profile
« on: December 13, 2007, 07:39:07 AM »


I have created a script for backing up to s3, this runs fine when invoked from the command line by myself just running ./sync_wednesday.sh but when i attempt to run this script from a cron like this:

01 06 * * 4 root run-parts /home/s3sync/syncscripts/sync_wednesday.sh

i get an email saying:
/home/s3sync/syncscripts/sync_wednesday.sh: line 6: ruby: command not found

sync_wednesday.sh looks like this:

# script to upload local directory upto s3
cd /home/s3sync/s3sync/
export AWS_ACCESS_KEY_ID=55555555555555555555555
export AWS_SECRET_ACCESS_KEY=55555555555555555555555555555
export PATH=/usr/local/bin:$PATH
ruby s3sync.rb -r --ssl --delete /backup/cpbackup/daily/  myBackup:serverName/wednesday/

the export PATH bit is just guesswork on my part, ruby is in that directory so i figured that might help but it doesnt.

any ideas?

Sr. Member
Posts: 363

(I am greg13070 on AWS forum)

View Profile
« Reply #1 on: December 13, 2007, 09:05:50 AM »

Why not just make the command say /usr/local/bin/ruby then?
Pages: [1]
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!