Operating System - HP-UX
1837943 Members
4355 Online
110124 Solutions
New Discussion

Re: 'cron daemon' cannot be started automatically after it have been dead.

 
Sakolnop Sompongsakul
Occasional Contributor

'cron daemon' cannot be started automatically after it have been dead.

I had faced the problem that 'cron daemon' could not be started automatically by itself when it died. So I checked the '/etc/inittab' file, there is no line about 'cron' so that I decided to put it in the '/etc/inittab' file. It works; but sometimes it gives me some errors that 'cron have been already started. This program will be started again in 5 minutes', which means that this error message will display every 5 minutes; and some progroms which have been already scheduled cannot be started by 'cron daemon'.

What should I do with 'cron daemon' to let it restart automatically after it dies without any errors?
2 REPLIES 2
Victor Fridyev
Honored Contributor

Re: 'cron daemon' cannot be started automatically after it have been dead.

Hi,

The following two ways exist for daemons start up: to put appropriate script into /sbin/rcN.d and to add a string into /etc/inittab.
AFAIK, crontab is startud up in /sbin/rc2.d
If you prefer to use inittab instead of this,
edit the file /etc/rc.config.d/cron and set CRON=0
In this case cron daemon will not be started up when the computers goes up.

HTH
Entities are not to be multiplied beyond necessity - RTFM
Steve Steel
Honored Contributor

Re: 'cron daemon' cannot be started automatically after it have been dead.

Hi


Instead of starting cron in inittab write a script which checks for cron running and starts it if it is not.

Put that in inittab and then no messages


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)