Having some issues with cronjob


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Having some issues with cronjob
# 1  
Old 02-24-2014
Having some issues with cronjob

Hi,

i have a cronjob scheduled to run daily at 7AM , the job which i am executing has three other scripts in it to execute. The first scripts gets executed perfectly but the 2nd and 3rd scripts which take 4-5 mins to complete does not executes,is there anything that i am missing.

This is what i do excatly

07 00 * * * /path/to/file/Run.sh


Code:
EXPORTDATE=`date --date "2 days ago" +%Y-%m-%d`
echo " $EXPORTDATE "
sh /path/to/file//file.sh $EXPORTDATE
sh /path/to/file/a.sh $EXPORTDATE
sh /path/to/file/b.sh $EXPORTDATE
~


Last edited by vikatakavi; 02-24-2014 at 11:43 AM..
# 2  
Old 02-24-2014
?
We dont have enough information to help you... what errors are you getting? What's in the cron logs?
But first of all does this script (run.sh) run correctly when you execute it?
What should we understand from this line:
Code:
echo " $EXPORTDATE "sh /path/to/file//file.sh $EXPORTDATE

# 3  
Old 02-24-2014
Hi Vbe,

echo " $EXPORTDATE "sh /path/to/file//file.sh $EXPORTDATE
i corrected this line in the above script it was my mistake when i did ctrl+v
all the scripts in the run.sh executed perfectly when ran manually.
# 4  
Old 02-24-2014
What is your OS?
You should have a look in the cron logs to see what is going on... Because the most obvious sh may be something you have in your environment that cron is not aware of...
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Cronjob

How to set cronjob for 48 hours. I can set for 2 days as shown below. * * */2 * * It is creating confusion for 30 days & 31 days per month. (3 Replies)
Discussion started by: Nishit
3 Replies

2. UNIX for Dummies Questions & Answers

Facing issues while running a cronjob !

Hi, I am trying to run a cronjob. But while doing so I am getting the following error message :- can't open yourfile in /var/spool/cron/crontabs directory. No such file or directory How can I resolve this issue ? Please help. Thanks Please view this code tag video for... (14 Replies)
Discussion started by: acidburn_007
14 Replies

3. UNIX for Dummies Questions & Answers

cronjob

Is the cronjob below can run only first wednesday of every month? 30 5 1-7 * 3 command please tell me (3 Replies)
Discussion started by: Anjan1
3 Replies

4. UNIX for Dummies Questions & Answers

Cronjob help

Hi I am very new to linux. I want to run a cronjob every 15 minutes that checks a directory for files. If the directory contains more than ten files I want it to send an email to me. All I have is this... */15 * * * * ls -l | wc -l | | mail -s "This is just a test" I would... (2 Replies)
Discussion started by: LinuxNewb
2 Replies

5. UNIX for Dummies Questions & Answers

how to cancel a cronjob if the cronjob still running

hi everyone I'm newbie in this forum hope I can get some help here :) I have a command in crontab that executed every 1 minute sometime this command need more than 1 minute to finish the problem is, the crontab execute this command although it's not finish processing yet and causing the system... (7 Replies)
Discussion started by: 2j4h
7 Replies

6. AIX

cronjob

Hi, I want to schedule a script on daily basis in morning 8:00 A.M and 5:00 P.M , how can i achieve this, i want the parameter 0 ? * * * what will be the second parameter in my case. Regards (1 Reply)
Discussion started by: maooah
1 Replies

7. UNIX for Dummies Questions & Answers

Issues with cronjob : Script using sendmail

Hi All, I am new to unix. I have created a cron job, that sends mail using sendmail utility. Am facing a unique problem while making a cron job for this script. In the script I append a file to my mail using 'cat' command. cat $report >> $mailMsg & this $mailMsg is used as mail... (7 Replies)
Discussion started by: anshulporwal
7 Replies

8. Solaris

at vs cronjob

HI, What is the differnece between at / con job? thanks in advance. (1 Reply)
Discussion started by: mokkan
1 Replies

9. HP-UX

CronJob

Dear Guru, I have submitted some cronjobs that has been running for quite sometimes. However, today I counter some cronjob did not run. Can you please explain what causes this to happen. Any system setting that limit number of cronjob per minutes to be started, etc? Thanks. Kelly (1 Reply)
Discussion started by: hcng08
1 Replies

10. Shell Programming and Scripting

Cronjob

Please can someone help me. I need to set up a cron job to measure CPU usage, Disk I/O and memory usage over a period of 1 minute along with the number of users logged into the system. I also need to send it to another user besides myself every hour. Please can someone help me! Thanks. (4 Replies)
Discussion started by: gerwhelan
4 Replies
Login or Register to Ask a Question