Results 1 to 6 of 6
Hi,
I have the following jobs configured to run every 15 minutes
0,15,30,45 * * * * . /home/decimal/sms_engine/OutSmsProcessor.sh
0,15,30,45 * * * * . /home/decimal/sms_engine/InSmsProcessor.sh
when i run these ...
- 10-29-2009 #1Just Joined!
- Join Date
- Oct 2009
- Posts
- 6
Cron Job Issue
Hi,
I have the following jobs configured to run every 15 minutes
0,15,30,45 * * * * . /home/decimal/sms_engine/OutSmsProcessor.sh
0,15,30,45 * * * * . /home/decimal/sms_engine/InSmsProcessor.sh
when i run these commands from command line they run fine and processing happens as expected. The cron log shows that these jobs are running fine
command tail /var/log/cron shows the following
Oct 29 03:45:01 services crond[7416]: (decimal) CMD (. /home/decimal/sms_engine/InSmsProcessor.sh)
Oct 29 03:45:01 services crond[7419]: (decimal) CMD (. /home/decimal/sms_engine/OutSmsProcessor.sh)
In spite of this no processing is being done by the program.
Could someone please help
Thanks a ton in advance.
- 10-30-2009 #2Linux Newbie
- Join Date
- Jan 2008
- Location
- Canada
- Posts
- 109
Hi mehtalalit
I notice that there is a decimal and a space prior to your script invocation. The . is unnecesary, but if you do have it it must precede the / with no space between them. Because you are using a complete path the decimal is not necessary. Cheers...
Robert
- 10-30-2009 #3Yes,I would agree with Robert.you are using a complete path the decimal is not necessary.
If problem persists,check the permission bits of .sh file. - make sure user has appropriate rights and also make sure .sh is an executable file.- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------
- 10-30-2009 #4Just Joined!
- Join Date
- Oct 2009
- Posts
- 6
The permissions on the .sh file are
-rwxrwxr-x 1 root root 226 Oct 29 23:32 OutSmsProcessor.sh*
The crontab entry has been configured as
*/15 * * * * /bin/bash /home/decimal/sms_engine/OutSmsProcessor.sh
I have also tried
*/15 * * * * /bin/sh /home/decimal/sms_engine/OutSmsProcessor.sh
Nothing seems to be working
Lalit
- 10-30-2009 #5
Is log file still showing same error messages?
I would suggest you to try a simple script
just places current time in a file.#cat simple.sh
date > /home/lg/log.txt
Edit crontab,so that script runs every 2 minutes .
After every two minutes , /home/lg/log.txt will have current time.*/2 * * * * lg /bin/bash /home/lg/simple.sh
Does this work?
if so ,then there must be some issue your OutSmsProcessor.sh file content.- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------
- 10-30-2009 #6Just Joined!
- Join Date
- Oct 2009
- Posts
- 6
Thank you. It started working. I had to specify complete path for java command i.e /usr/java/jre/bin/java instead of just java


Reply With Quote
