Do cron jobs use a lot of server resources?

Inquestor

Well-known member
Joined
Feb 1, 2013
Messages
495
Points
63
From my experience it's not so much the cron job but what script the cron job will be running that determines the amount of resources you'll use.
 

Rob Whisonant

Moderator
Joined
May 24, 2016
Messages
2,481
Points
113
Another thing to watch out for is a cron that runs to frequently for the script it is launching. Let me give you an example.

You have a cron running once per minute. It runs a script that takes 5 minutes to run. Now the cron is spawning multiple instances of the same script. This can start eating up your RAM.

If the script you need to run via cron uses a lot of resources, be careful that you are not running it again and again if it is already running. The best thing to do here is to add code to the start of the script to detect if it is already running and just exit.
 
Older threads
Replies
5
Views
3,341
Replies
3
Views
3,956
Replies
33
Views
11,267
Latest threads
Replies
2
Views
99
Replies
1
Views
182
Replies
5
Views
394
Replies
11
Views
541
Replies
2
Views
233
Recommended threads
Replies
9
Views
4,246
Replies
3
Views
2,851
Replies
4
Views
4,134

Latest postsNew threads

Referral contests

Referral link for :

Sponsors

Popular tags

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top