1

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 
11
  • Any more information (command, logs, error messages)...
    – Khaled
    Nov 30, 2011 at 12:01
  • @Khaled hey I have added more info kindly have a look Nov 30, 2011 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, 2011 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, 2011 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 Nov 30, 2011 at 12:21

1 Answer 1

1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .