Operating System - HP-UX
1855484 Members
2949 Online
104111 Solutions
New Discussion

Re: crontab is not working

 
Iftekhar Ahmed Shafi
Occasional Advisor

crontab is not working

Hi guys

I m facing a pronblem in my system. my crontab -e is not showing any editor. crontab -l also not showing anything. I restarted the cron daemon.
Log attached.

My system is:

HP-UX wdkerpn1 B.11.23 U 9000/800 3216307598 unlimited-user license

Plzz I need a quick response.....
7 REPLIES 7
Rita C Workman
Honored Contributor

Re: crontab is not working

Maybe your cronfile got deleted.

Is there a file at /var/spool/cron/crontabs/root ???

If you can edit other files then.....
Maybe you could just create a simple new file 'root', then try to cron it.

Just a quick thought,
Rita
Iftekhar Ahmed Shafi
Occasional Advisor

Re: crontab is not working

Hi

These are my crotabs. If u look at the log it shows crontab is working. But I cannot open the crontab by crontab -e or -l. Same for other users in cron.allow

root@wdkerpn1 [/var/spool/cron/crontabs]
# ll
total 64
-r-------- 1 root sys 79 Apr 30 17:34 root
-r-------- 1 root sys 79 Jul 17 2006 root.old.back
-r-------- 1 root tabs 984 Dec 25 15:51 tabsrpt
-r-------- 1 root sys 984 Apr 30 17:28 tabsrpt.back
Steven E. Protter
Exalted Contributor

Re: crontab is not working

Shalom,

Your crontab is indeed gone for root. It is kept in /var/spool/cron and can be restored from backup.

Our you could cut and past into vi session from your attachment. Clean up the extra characters, save and wala! a crontab.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Iftekhar Ahmed Shafi
Occasional Advisor

Re: crontab is not working

Dear

Our application guys use their crontab to run some scripts. But its 2 node cluster. So they kept the entry in both nodes. But because the another node is the primary node for the package. So this nodes cronjobs will always fail. Can u tell me in which conf file the vi editor is assigned for cron. Should I check there?

root@wdkerpn1 [/var/spool/cron]
# ll
total 32
dr-xr-xr-x 2 bin bin 96 Jul 19 2006 atjobs
-r--r--r-- 1 bin bin 334 Apr 30 16:27 crontab.root
dr-xr-xr-x 2 bin bin 96 Apr 30 17:34 crontabs
drwxrwxrwt 2 root root 8192 Apr 30 17:30 tmp
Rasheed Tamton
Honored Contributor

Re: crontab is not working

Hi,

# Set up the variable in user's .profile
EDITOR=vi
export EDITOR
Iftekhar Ahmed Shafi
Occasional Advisor

Re: crontab is not working

Dear

I reinstalled PHCO_32371. And now its working fine.

Thanks for ur help.
Iftekhar Ahmed Shafi
Occasional Advisor

Re: crontab is not working


Actually our client here is terrible. So we always stay in too much pressure. So I m very happy for getting this quick reply s from u guys.