Sponsored Content
Top Forums UNIX for Dummies Questions & Answers If user has own crontab, results in accumulation of root CRON processes Post 302393438 by Narnie on Monday 8th of February 2010 07:44:01 PM
Old 02-08-2010
Quote:
Originally Posted by TonyFullerMalv
Well no wonder cron is getting stuck then...

I tend to use mailx rather than sendmail directly when scripting, e.g. to send a mail message:
Code:
$ mailx -s "Subject heading" user@domain.com < message_file.txt

What are you trying to achieve with sendmail, and what Unix are you using, I do not see a -i option for sendmail on the manpage I am looking at?
I've come to realize that the sendmail package isn't installed.

It is just a symbolic link to postfix set up by installing bsd-mailx.

I have changed my crontab to

Code:
MAILTO=""
#m      h       dom     mon     dow     command
*       *       *       *       *       /home/woodnt/bin/test_cron > /dev/null 2>&1

Check out this ps output after doing that:

Code:
root      1446  0.0  0.0  18708   996 ?        Ss   18:48   0:00 cron
root      3631  0.0  0.0  91236  2188 ?        S    18:56   0:00  \_ CRON
root      3632  0.0  0.0  91240  1264 ?        S    18:56   0:00  |   \_ CRON
woodnt    3633  0.0  0.0      0     0 ?        Zs   18:56   0:00  |       \_ [sh] <defunct>
root      3720  0.0  0.0  91236  2188 ?        S    18:57   0:00  \_ CRON
root      3721  0.0  0.0  91240  1264 ?        S    18:57   0:00  |   \_ CRON
woodnt    3722  0.0  0.0      0     0 ?        Zs   18:57   0:00  |       \_ [sh] <defunct>
root      3752  0.0  0.0  91236  2188 ?        S    18:58   0:00  \_ CRON
root      3753  0.0  0.0  91240  1264 ?        S    18:58   0:00  |   \_ CRON
woodnt    3754  0.0  0.0      0     0 ?        Zs   18:58   0:00  |       \_ [sh] <defunct>
root      3784  0.0  0.0  91236  2188 ?        S    18:59   0:00  \_ CRON
root      3785  0.0  0.0  91240  1264 ?        S    18:59   0:00  |   \_ CRON
woodnt    3786  0.0  0.0      0     0 ?        Zs   18:59   0:00  |       \_ [sh] <defunct>
root      4155  0.0  0.0  91236  2188 ?        S    19:11   0:00  \_ CRON
root      4156  0.0  0.0  91240  1264 ?        S    19:11   0:00  |   \_ CRON
woodnt    4157  0.0  0.0      0     0 ?        Zs   19:11   0:00  |       \_ [sh] <defunct>
root      4181  0.0  0.0  91236  2188 ?        S    19:12   0:00  \_ CRON
root      4182  0.0  0.0  91240  1264 ?        S    19:12   0:00  |   \_ CRON
woodnt    4183  0.0  0.0      0     0 ?        Zs   19:12   0:00  |       \_ [sh] <defunct>
root      4209  0.0  0.0  91236  2188 ?        S    19:13   0:00  \_ CRON
root      4210  0.0  0.0  91240  1264 ?        S    19:13   0:00  |   \_ CRON
woodnt    4211  0.0  0.0      0     0 ?        Zs   19:13   0:00  |       \_ [sh] <defunct>
root      4891  0.0  0.0  91236  2188 ?        S    19:14   0:00  \_ CRON
root      4892  0.0  0.0  91240  1264 ?        S    19:14   0:00  |   \_ CRON
woodnt    4893  0.0  0.0      0     0 ?        Zs   19:14   0:00  |       \_ [sh] <defunct>
root      5469  0.0  0.0  91236  2188 ?        S    19:15   0:00  \_ CRON

 

10 More Discussions You Might Find Interesting

1. Linux

How to receive results from processes spawned on external machines using SSH

I am trying to get the number of cpus on a farm of linux boxes (about 100 of them) by 'sshing' to each of them and checking their /proc/cpuinfo file. So I have a local script localscript.sh on each of those 100 machines which retrieves the number of cpus in it by using its /proc/cpuinfo file.... (1 Reply)
Discussion started by: waavman
1 Replies

2. UNIX for Dummies Questions & Answers

Possible to give non root user sudo to "crontab -l"

Does anyone know if this is possible? I want to give some users access to root's crontab but only with a read privilege. Is this possible to do or can only root or people with full root sudo view root's cron? (4 Replies)
Discussion started by: LordJezoX
4 Replies

3. AIX

Crontab cannot run by non-root user

Good morning everybody. I have just receiedv a complaint from our DBA saying that if he create a scripts to run some Oracle performance scripts using crontab and the scheduling part is ok but the job is failed when I checked on /var/adm/cron/log. I have tried his scripts using Oracle id directly... (4 Replies)
Discussion started by: kwliew999
4 Replies

4. Solaris

"! bad user (root)" in cron log

I am getting the following error in the cron log: ! bad user (root) Wed Sep 22 14:30:00 2010 < root 8989 c Wed Sep 22 14:30:00 2010 rc=1 What does this mean? (5 Replies)
Discussion started by: jastanle84
5 Replies

5. Shell Programming and Scripting

Cron job initiating ssh AND sudo (from user, not root)

I've been bashing my head on the desk for 2 days trying to get this to work, but I've had no luck. I'll try to be as clear as possible in my explanation without dragging out the details. I'm trying to set up a cron job for user "john" which runs a script. This script initiates an ssh connection to... (5 Replies)
Discussion started by: eh3civic
5 Replies

6. UNIX for Dummies Questions & Answers

Editing crontab of non-root user from file

Hi All, Ref: "build crontab from a text file" in same forum. (I am not allowed to post URL's in the first post) We are reorganizing our UNIX Crontab file by first making changes in a word pad text file. The intent is to then copy it back to Crontab. Will this work? Copy and Paste does not... (6 Replies)
Discussion started by: nivedhitha
6 Replies

7. UNIX for Dummies Questions & Answers

Sudo to delegate permission from non-root user to another non-root user

I've been through many threads before i decide to create a separate thread. I can't really find the solution to my (simple) problem. Here's what I'm trying to achieve: As "canar" user I want to run a command, let's say "/opt/ocaml/bin/ocaml" as "duck" user. The only to achieve this is to... (1 Reply)
Discussion started by: canar
1 Replies

8. Solaris

Bad user root in crontab

Hi everyone, I got error which is "!bad user (root)" in crontab... I tried changing password, I checked etc/cron/cron.allow and cron.deny, And also I checked the permissions of my files, its(my crontab script) still not working.... Please help... (12 Replies)
Discussion started by: ijustneeda
12 Replies

9. Shell Programming and Scripting

CRON JOB not running - for tape backup from root user

I am trying a cron on root user to backup to tape using TAR command here is the cron entry 11 08 * * 6 /erdhot1cron 2>&1 >> /test3/scripts/dba/erdhot1cron.log here is script inside - edhot1cron #!/bin/bash vsysdt=`date +%d%m%y` date tar -cvf /dev/st0... (4 Replies)
Discussion started by: vijaymec50
4 Replies

10. UNIX for Dummies Questions & Answers

Is CRON only for root user

Hi, i have question about cron. can we have user based cron file under /var/spool/cron or we should have only root file which can only be accessed by root user or admin and he should only be doing the task of scheduling. PKS (8 Replies)
Discussion started by: praveenkumar198
8 Replies
All times are GMT -4. The time now is 05:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy