Execution problems with crontab


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Execution problems with crontab
# 1  
Old 12-13-2008
Bug Execution problems with crontab

I need your help please
Inin a production system i found crontab entries was removed because i typed crontab -l with username corasc and didn't show anything.
i asked the administrador to restored the mentioned crontab, he restored the crontab:
The problem is when restored the crontab file is not executing any entry:
What happenned:?
i checked up the /usr/lib/cron/cron.allow and the username corasc is included, also checkup the /usr/lib/cron/cron.deny and it doesn exist

i checked up the crontab file and permissions and:
ls -lrt /var/spool/cron/crontabs/corasc
-r-------- 1 root colombia 1072 Dec 4 02:50/var/spool/cron/crontabs/corasc
BEFORE BEING REMOVED THE CRONTAB, IT WAS WORKING, si i show you the crontab lines
corasc@altamira00 : corasc > crontab -l
#Logs maintainance
0 0 * * * /usr/bin/find /export/app/CO/rasc/log/xa -name "*.trc" -mtime +2 -exec rm -f {} \; > /dev/null 2>&1
0 0 * * * /usr/bin/find /export/app/CO/rasc/log/ULOG -name "ULOG." -mtime +2 -exec rm -f {} \; > /dev/null 2>&1
0 0 * * * /usr/bin/find /export/app/CO/rasc/log/MAS "*.log" -mtime +2 -exec rm -f {} \; > /dev/null 2>&1

# Generacion Pines
00 2 * * * /export/app/CO/rasc/scr/lanza_generacion_pines.sh > /dev/null 2>&1

# Informes
0 3 1 * * /export/app/CO/rasc/scr/Informe_Tarjetas.ksh > /dev/null 2>&1
52 05 08 * * /export/app/CO/rasc/scr/Informe_Tarjetas.ksh > /export/app/CO/rasc/scr/log_Tarjetas.txt > /dev/null 2>&1
# Generacion de estadisticas
5 0 * * * /export/home/corasc/scripts/EstadisticasTUX.ksh > /export/app/CO/rasc/log/EstadisticasTUX.log > /dev/null 2>&1

I'd appreciate your help thanks
# 2  
Old 12-13-2008
Have you rebooted the system or shut down cron and restarted it? That is required on the systems I use.
# 3  
Old 12-14-2008
Hello -

On my system (Linux 2.6 kernel) you dont have to restart cron nor the system if you change an individual crontab.

First thing I would check is the local system mail for corasc. I think by default cron errs get mailed to the user. They also go to syslog by default, if you have access.

If you look at the man page for crontab it describes a certain bug:

BUGS
Although cron requires that each entry in a crontab end in a newline character, neither the crontab command nor the cron daemon will detect this error. Instead, the crontab will appear to load nor‐
mally. However, the command will never run. The best choice is to ensure that your crontab has a blank line at the end.


Might be your issue

yrs

Michael
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Execution problems

How to find a word in a directory which contains many files? i just want to count how many such words are present in all the files? This is the code which i tried for a single file echo "Enter the file name:" read file echo "Enter the word to search:" read word if then echo "The count... (4 Replies)
Discussion started by: Meeran Rizvi
4 Replies

2. HP-UX

Crontab Execution

Hi Guys, I need help to clear my doubt w.r.t Crontab execution. uname -a HP-UX myservername B.11.31 U ia64 1422528451 unlimited-user licenseI created a crontab entry to execute particular job on Saturday 11/15/2014 11:22 Below is the cron entry #refresh DEVDB from PRODDB 22 11 15 11 6... (6 Replies)
Discussion started by: rocky.community
6 Replies

3. UNIX for Dummies Questions & Answers

Execution Problems with Crontab

Dear Folks, I have written a shell script which internally connects to oracle database through sqplplus command line. The script runs fine when run manually. Now I am scheduling it to run (Linux environment) from crontab. In crontab it is failing with an error: sqlplus command... (6 Replies)
Discussion started by: tamojitc
6 Replies

4. Shell Programming and Scripting

Execution Problems

this my source file ************* fixed *************** Begin equipmentId : d9 processor : fox number : bhhhhhh Variable # 1: Id : 100 Type : 9 nType : s gType : 5f mType : 4 LField : England DataField : london Length ... (6 Replies)
Discussion started by: teefa
6 Replies

5. Shell Programming and Scripting

Problem with Job execution using crontab

Hi All, I am facing a problem with crontab.I made an entry in crontab like this 05 07 * * * /afs2/cdwfullacc/current/exe/cdw_generate_special_klant.sh > /afs2/cdwfullacc/current/scratch/cdw_gen_cron.log But job was not getting executed. Entry in crontab was made with same user by whom... (4 Replies)
Discussion started by: krishna_gnv
4 Replies

6. Shell Programming and Scripting

Execution of Unix script after every second without crontab

Hi, I have shell script "A" which is executing oracle pl/sql procedure and initiate its multiple threads at a time as below on given user value in an other script "B". I want to execute script "A" after every second with out cron tab as " A " will keep on executing after every second till... (1 Reply)
Discussion started by: saad.imran@gmai
1 Replies

7. Shell Programming and Scripting

Execution Problems!!

i have been working on this for a about 12 hours today say's end of file un expected any idea's using the bourne shell and its driving me nuts worked fine in bash but prof says make it work in bourne and good luck worth 13% any help would be awesome #!/bin/sh trap "rm mnt2/source/tmp/* 2>... (1 Reply)
Discussion started by: mrhiab
1 Replies

8. UNIX for Dummies Questions & Answers

Problem with Crontab execution

Hi I have shell script to excute the SQL script.And i have scheduled those shell script in crontab.But the Shell script is not running timely and i got the below error Crontab entry 15 05 17 7 * /export/home/vcpsapp/vcps/stat.sh Output Your "cron" job on uspxivus16... (3 Replies)
Discussion started by: mak_boop
3 Replies

9. UNIX for Dummies Questions & Answers

Unscheduled crontab execution

Hi All, Do apologise, for it has been a long while since I was last on the forum. I've been doing documentation and primiarily Windows efforts for some while now. :( We are running a HP-UX 11.23 unit. This morning two separate crontab users executed shutdown scripts of their respective... (14 Replies)
Discussion started by: Cameron
14 Replies

10. Shell Programming and Scripting

crontab execution

is it possible to soecify time overnight in 5 days for example: 0 18-7 * * 1-5 /mycode is this okay to use 18-7 because im not getting the results correctly? (4 Replies)
Discussion started by: vadharah
4 Replies
Login or Register to Ask a Question