interpretate limits.conf in crontab
Hi there,
i like to raise my open files limit. this can be done in /etc/security/limits.conf. when i start my script from the command line, (my script reads the ulimit -n from the system), then, it reads the new open files limit from limits.conf correct. but when i run the same script in the crontab, it reads the default value of "max. open files" => 1024 i know, that crontabs don't load system config files. normally i use the command "source" to load a specific config file, but that doesn't work for the file limits.conf. the error i get is this one: # source /etc/security/limits.conf -bash: root: command not found -bash: root: command not found -bash: myuser: command not found -bash: myuser: command not found does somebody know how crontab can interpretate limits.conf correct? thanks for helping. greetings 223 |
The easiest way to set file limit in your shell configuration file. Add line in .bashrc
ulimit -S -c 0 which means unlimited, and no core file. |
Quote:
ulimit -S -c 0 ..this doesn't work. there is even the default value 1024. (i rebooted the system after adding the line in .bashrc) greetings 223 |
i wonder that there is no solution for that.. :eek:
|
I don't know then: when I type "ulimit" at the command prompt, it gives me "unlimited", and as far as I could see it is set in .bashrc as I mentioned above.
|
Quote:
cheers |
i got the soluteion!
the problem was, that the system config of a "normal" user can't be read by a "normal" users crontab. Now, i ran the crontab as user root, and added an "su [user] -c" in the front of each command, which means that the command will be executed as [user]. |
All times are GMT -5. The time now is 03:41 PM. |