LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 01-17-2005, 05:50 PM   #1
JakeS
LQ Newbie
 
Registered: Jun 2003
Posts: 14

Rep: Reputation: 0
maximum size for crontab?


I need to run a very large crontab file. Everything is set up but I noticed some of the jobs were being ignored. I figured out everything on line 256 and over is ignored. crontab -l lists all the lines, but they are still ignored. Man page (FC2) didn't say anything abouit it.
Any ideas?
Thanks
 
Old 01-17-2005, 06:14 PM   #2
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: Ubuntu, FreeBSD, NetBSD
Posts: 1,449

Rep: Reputation: 47
Are some of the commands run at the same time?

Maybe you could make them into one script that cron calls.

I can't imagine needing more than 256 cron entries. I don't know if there is a limit... but there might be. I'd look for a work around.

What kind of stuff are you running that you need 256+ entries!!!?
 
Old 01-17-2005, 06:41 PM   #3
JakeS
LQ Newbie
 
Registered: Jun 2003
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by frob23
Are some of the commands run at the same time?

Maybe you could make them into one script that cron calls.

I can't imagine needing more than 256 cron entries. I don't know if there is a limit... but there might be. I'd look for a work around.

What kind of stuff are you running that you need 256+ entries!!!?
I would love a workaround...
The computer is running a set of 10 temperature controllers over a network. Each temp controller has it's own theremal regime that simulates a diel cycle, so that setpoints have to be updated every 10 minutes. If you do the math thats 10 controlers * 6 updates per hour * 24 hours a day. Becasue each treatment is a little different there isn't any redundancy (this is a biology lab if you hadn't figured it out). Finally, to make it worse, some of the treatments have to fluctuate randomly (ie. today it will fluctutate from 27-31C, tomorrow it may fluctuate from 26-32C).
Here is what I did:
-The controllers are networked, so I wrote a script that takes the new temperature and an ip address as arguments and changes the setpoint.
-The cron script has a line for each change in temp for all controllers
-There are multiple versions of the cron script (representing possible "random" regimes) and each day at midnight a new random thermal regime is picked.

Everything works fine except the lower portions of the cron list are being ignored.

I really like using the cron becuase it's easy to work with. I could probably alter the existing script (perl) to do the math of figuring out the proper temps based on time and some other variables but I was hoping for an easier fix.

Thanks in advance
 
Old 01-17-2005, 06:57 PM   #4
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: Ubuntu, FreeBSD, NetBSD
Posts: 1,449

Rep: Reputation: 47
Do you hit all 10 at the same time? Could you?

You could then put all 10 in a file with whatever temps they need. Basically the 10 commands you would be giving in the crontab.

You would then have 144 lines... calling scripts. You can then have different crontabs call preselected different scripts.

Basically... seperate out everything by sets of 10 and run them as scripts... or is that not going to work. The scripts can call scripts... that's okay.

Would that work?

BTW: I did a search and wasn't able to find any practical reason it was limited at 256 entries... but assuming that is the problem we should be able to find a way around it.
 
Old 01-17-2005, 07:15 PM   #5
JakeS
LQ Newbie
 
Registered: Jun 2003
Posts: 14

Original Poster
Rep: Reputation: 0
Yes, that will work but it would be a little clunky. I would have to figure out a way to do the random variation treatments...maybe in a separate set of files.
 
Old 01-17-2005, 07:23 PM   #6
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: Ubuntu, FreeBSD, NetBSD
Posts: 1,449

Rep: Reputation: 47
The way I would do it would be:

set001/script001.sh
set001/script002.sh
set001/script003.sh
...etc...
set002/script001.sh
set003/script002.sh
...etc...
setNNN/script001.sh

and so on.

Just sort out all the lines which run at a same time into each script and put the in a directory... one for each special crontab. If you already have the jobs running 10 at a time then this could be done with a few commands... and wouldn't be very hard.

Then all you have to do is Make a crontab with:
[time information] /pathto/set001/script001.sh
[time information] /pathto/set001/script002.sh

Then make as many copies as you have sets... and change that one directory for each different crontab so it uses a different set... with vi it would take two seconds (:g/set001/s//set002/) for each script. Then you can use the same thing to change between the master crontabs randomly at night.

Edit: This would make it pretty easy to add sets if you wanted... at least I think so.

Last edited by frob23; 01-17-2005 at 07:25 PM.
 
Old 01-18-2005, 05:23 PM   #7
JakeS
LQ Newbie
 
Registered: Jun 2003
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks, I got a fairly good fix. I put all the temperatures for a controller in a text file in the order they are called. The script checks the time and then knows where in the list of temperatures it needs to get it's new setpoint. Changing a treatment (or the random variability) is only a matter of altering the lists of temps in the text files. My crontab is only a few lines this way and everything is easy to manage.
Still, seems that crontabs are limited in size, at least in this distro.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Maximum Share size + Samba hendrixbart Linux - Software 1 11-11-2010 12:10 PM
Maximum size of initrd image ?? PeteRossi Slackware 5 03-26-2007 09:30 AM
Maximum DVD iso size jhoderd Linux - General 1 05-04-2005 10:26 PM
Setting maximum size of windows desheikh Linux - General 5 03-17-2005 08:43 AM
maximum partition size for mandrake 9.2 ? elrohir_telperi Mandriva 11 05-06-2004 05:14 PM


All times are GMT -5. The time now is 09:29 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration