1838870 Members
3532 Online
110130 Solutions
New Discussion

cron settings on boot up

 
Geoff Connolly
New Member

cron settings on boot up

we seem to have a problem
when we reboot our server the cron starts with a low ulimit -n parameter
(lower than the soft parameter)

however if we stop the cron as root and restart it everything seems ok (cron takes the correct ulimit -n)

how do we set the correct ulimit for the cron on boot ??

Geoff


3 REPLIES 3
Sanjay Kumar Suri
Honored Contributor

Re: cron settings on boot up

Any change made in /sbin/init.d/cron which is causing this?

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Simon Hargrave
Honored Contributor

Re: cron settings on boot up

Not sure if there's a better way, but you could edit /etc/rc.config.d/cron and add: -

ulimit -n 2048 (or whatever you need)

Since the cron rc script sources this file, it will set the ulimit for cron.

It's better than editing the rc script directly, since this may be overwritten with future OS patches. The config file should not.
Geoff Connolly
New Member

Re: cron settings on boot up

yeah i noticed that
i was going to edit /sbin/rc2.d/S730cron
thanks for the advice