Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a AWS EC2 instance with ubuntu 10.10 server. I am trying to add a cron job to the list. But the cron job is not being executed.

I am actually uploading a particular file to aws s3 using s3cmd visit s3tools.org

What will be in the problem and also the solution.

Kindly help me out

Here is the bash script which has to be run

s3cmd put file-name s3://bucket_name/foder_name/file-name 

Here is the job

* * * * * bash /path/to/file.sh 
share|improve this question
    
Any more information (command, logs, error messages)... –  Khaled Nov 30 '11 at 12:01
    
@Khaled hey I have added more info kindly have a look –  Jeevan Dongre Nov 30 '11 at 12:09
    
Did you try to run the command manually under the same user? Also, it is better (in cron jobs) to refer the files using absolute path such as /bin/bash. –  Khaled Nov 30 '11 at 12:14
    
Does the cronjob run if you alter the command to something like this: * * * * * /usr/bin/touch /tmp/cron-worked Have you tried altering your cron entry to: * * * * /bin/bash /path/to/file.sh –  Lunar_Lamp Nov 30 '11 at 12:16
    
@Khaled I had a script which is running fine without the /bin/bash. yes I tried to run the script as user, its running fine I mean it will upload the file. But not cron –  Jeevan Dongre Nov 30 '11 at 12:21

1 Answer 1

up vote 1 down vote accepted

I was able to figure out the solution for this. The problem was I need to specify absolute path thats /usr/local/bin/s3cmd .

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.