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,422
Replies
3
Views
4,107
Replies
33
Views
11,346
Latest threads
Replies
1
Views
69
Replies
1
Views
85
Replies
1
Views
220
Replies
0
Views
229
Replies
0
Views
248
Recommended threads
Replies
9
Views
3,153
wms
Replies
15
Views
2,452
Replies
17
Views
8,384
Replies
0
Views
12,151
Replies
11
Views
6,835

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