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,483
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,425
Replies
3
Views
4,128
Replies
33
Views
11,346
Latest threads
Replies
1
Views
74
Replies
1
Views
88
Replies
1
Views
224
Replies
0
Views
233
Replies
0
Views
253
Recommended threads
Replies
6
Views
2,687
Replies
1
Views
1,284
Replies
10
Views
3,998
Replies
3
Views
6,966
Replies
18
Views
10,330

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