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,340
Replies
3
Views
3,951
Replies
33
Views
11,266
Latest threads
Replies
1
Views
81
Replies
1
Views
176
Replies
4
Views
384
Replies
11
Views
526
Replies
2
Views
228
Recommended threads
Replies
12
Views
6,708
Replies
1
Views
2,002
Replies
3
Views
1,151
Replies
4
Views
3,220
Replies
11
Views
5,551

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