Cron – How many cron jobs are too many

cron

I have a couple of cron jobs for basic maintenance which aren't very resource-intensive.

I also have custom task scheduling (which is just calling a .php file and passing information via GET, ie: cronjob.php?param1=param …). These can add up pretty quickly.

These just call system commands and run external programs (Nmap is one of them). They usually don't take long either.

Anyway, can anyone tell me, roughly what point is too many? I know it's hard to say since it depends on what job is being run and how often, but at what point does the crontab program start "struggling"? Anyone have any idea?

Thanks.

Best Answer

I wouldn't worry about the load on the "crontab program" (cron) itself; it's your overall system load you might want to pay attention to. Look at metrics (cpu utilization, io rates, web query response times) during the time your job(s) are running - is there a noticeable spike? is it bad enough that it's disrupting actual use of the system?

If the programs "don't take long", that's a good sign that it's not a problem.

If you're still concerned, you can do other things to limit the load: run the jobs with nice to reduce their priority, run them sequentially instead of simultaneously, and so forth.

Related Topic