[vox-tech] Problem running cronjob

Bryan Richter vox-tech@lists.lugod.org
Fri, 9 Apr 2004 23:44:41 -0700


On Fri, Apr 09, 2004 at 11:29:00PM -0700, Soumyadeep nandi wrote:
> Hi Everybody,
> 
> I want to set some task on the cronjob. As such I
> edited the crontab file as bellow:
> */1 * * * * echo "Hello"
> */1 * * * * /home/soumya/test.sh                      
>                                                       
>                                                
> 
> Here I want to print Hello in every minute and my test
> shell script should execute every minute.
> But it is not executing neither the Hello nor the
> shell script. 
> 
> <snip>
>                
> My cron file in /var/log/ has these updates:
> 
> <snip>
> 
> Apr 10 22:35:00 bic_server2 CROND[16958]: (soumya) CMD
> (/home/soumya/test.sh)
> Apr 10 22:35:00 bic_server2 CROND[16962]: (soumya) CMD
> (echo "Hello")
> Apr 10 22:36:00 bic_server2 CROND[16969]: (soumya) CMD
> (/home/soumya/test.sh)
> Apr 10 22:36:00 bic_server2 CROND[16971]: (soumya) CMD
> (echo "Hello")
> 
> 
> <snip>
>
>  Could you please tell me where I am doing the
> mistake, and why it is not executing the commands.
> 
> Regards 
> Soumyadeep

I think everything is working fine. What might be confusing is that your
test script is being run by its own instance of a shell. Its
input/output is not connected to a terminal. Try running a script that
does something noticeable, like creating a file ("touch
/home/soumya/cron_test_file"). 

-Bryan