Visit Our UNIX and Linux User Community


root cron


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers root cron
# 1  
Old 07-04-2002
Question root cron

Hi guys,

It's me again, I have a scenario and I need your advice...We've install an agent in unix 2.8 and we schedule a job to be run once a week. I've notice that the cron job that we schedule on the console(Other computer, win2k prof.) to be run on the agent is added to the root cron(agent side,unix, loc. /var/spool/cron/crontabs/root). My question is, if the root cron reach its maximum capacity how the unix will handle the incoming cron job from the console. Is the Unix has a mechanism that, if the root cron is loaded already, it will create another root cron file and transfer all the old contents so it will have enough space for incoming cron jobs from the console.

Sorry if I ask too much question, please be bear with me...I'm still a novice...

Kups
# 2  
Old 07-08-2002
I'm not sure of what you are asking but I think you are confusing going from console and changing root's crontab on a system versus going from another server (telnet, ssh....) to a system and changing root's crontab.

The crontab for root is a file (as you specified, /var/spool/cron/crontabs/root). To change the crontab for root, use the crontab -e command (read the man page on crontab first). The system will start some type of editor session - so it's like editing any other file at that point. You make changes, save, and exit the editor.

Quote:
if the root cron reach its maximum capacity how the unix will handle the incoming cron job from the console.
I have never heard of a maximum capacity for cron - I doubt you could reach it since those of us who have mistakenly created incorrect entries in cron which have created multiple processes in seconds can tell you, it won't be the crontab that gets to a maximum but the server - with runaway processes in endless loops. The most entries I have seen in a crontab to date: 171 (a DBA who has so much running in cron, I don't think he even needs to come to work anymore).
# 3  
Old 07-08-2002
Quote:
Originally posted by RTM
I have never heard of a maximum capacity for cron - I doubt you could reach it since those of us who have mistakenly created incorrect entries in cron which have created multiple processes in seconds can tell you, it won't be the crontab that gets to a maximum but the server - with runaway processes in endless loops. The most entries I have seen in a crontab to date: 171 (a DBA who has so much running in cron, I don't think he even needs to come to work anymore).
Modern versions of cron do have a limit. At least both HP-UX and Solaris do. And I have bumped into that limit many times. I have never heard on a limit of the number of entries in a crontab or a collection of crontabs. But there is a limit on the max number of sumultaneous cron jobs running. When you exceed this you get a message like this:
! c queue max run limit reached Sat Jul 6 04:00:00 2002
! rescheduling a cron job Sat Jul 6 04:00:00 2002
And yes, I copied that message from the log file on one of our servers.

The message is a little cryptic. If you look at your queuedefs file, you will probably find two lines, one for "at" jobs, and one for "batch" jobs. A third line that starts with a "c" could exist and it would be for cron jobs. In the absence of such a line, the defaults apply. That is 100, so you can have no more than 100 cron jobs running at once. But you can override this by editing your queuedefs file. And this is documented, see "man queuedefs".
 

Previous Thread | Next Thread
Test Your Knowledge in Computers #934
Difficulty: Medium
The C standard library does not specify any specific resolution, epoch, range, or datatype for system time values.
True or False?

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. UNIX for Dummies Questions & Answers

Create cron job without root

Hi there, I need to create a crone job to backup certain files on my disk without root permissions. Also if I will be able to edit cronetab then I need to know how to edit it with any editor other than vim :mad: (5 Replies)
Discussion started by: aelhosiny
5 Replies

4. 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

5. 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

6. UNIX for Dummies Questions & Answers

If user has own crontab, results in accumulation of root CRON processes

Hello, I seem to be having a problem with accumulation of root CRON jobs occuring when I have a user's cron job(s) running. Here is an example of a user's crontab file: */1 * * * * echo "hello" > /dev/nullps aux|grep CRON root 14333 0.0 0.0 91236 2172 ? S ... (12 Replies)
Discussion started by: Narnie
12 Replies

7. Shell Programming and Scripting

Adding a new root cron job

Hi there, I have over 2000 systems (mainly Solaris) and I want to write a script that inserts a new root cronjob on each of those servers. obviously just adding a line to /var/spool/cron/crontabs/root looks like the easiest way, but i really dont want to have to send a HUP to crond on all boxes ... (3 Replies)
Discussion started by: rethink
3 Replies

8. Shell Programming and Scripting

Not able to FTP a file with root cron

Hi All, I am facing a difficulty with root cron. There is a script which is running in root's cron for every 3 minutes. I am having a different but i have the access to change the script which is running in root's cron.In the script the output is already going to a file in /tmp.I have just added... (1 Reply)
Discussion started by: usha rao
1 Replies

9. UNIX for Dummies Questions & Answers

Cron Sends mail to root on completion of job.

All I am running a few scripts through a cron job. This is for checking some key services that are running on by box. The problem is, everytime the cron runs, it sends a mail to the root account. The root account mails need to cleared every now and then. Is there some way I can stop these... (1 Reply)
Discussion started by: skotapal
1 Replies

10. UNIX for Dummies Questions & Answers

root cron was override w/ 3rd party software

Hi Guys, I'm new in Unix Environment. Any Unix Guru around...I need help. My question is, is it possible that the root cron could be override with 3rd party software?How can it happen. Another thing, how the cron job works?, I mean how the Unix process the cron job , I don't have an idea... (2 Replies)
Discussion started by: kupal
2 Replies

Featured Tech Videos