Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a simple shell script that calls a pearl script and redirects its output to a text file. When I run this from shell it exceutes, but when I do this from crontab, it does not.

#!bin/sh
/user/scripts/abc.pl > /log/scripts/myfile.log .
share|improve this question
    
would you please show entry of script in crontab file? –  K.K Patel Jul 30 '13 at 2:40
    
0,5,10,15,20,25,30,35,40,45,50,55 **** /user/script/myscript.sh –  user179643 Jul 30 '13 at 2:41
    
@K.KPatel but i have other enteries like this and they work without any issue. Also i checked the cron log and it exits with return code1, so it does gets executed. my file.log is getting generated everytime but it is blank –  user179643 Jul 30 '13 at 2:46
    
did you get output when you run script? –  K.K Patel Jul 30 '13 at 2:49
    
when i run the script manually i got the desired output –  user179643 Jul 30 '13 at 2:50
show 2 more comments

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.