New Rule about crons

Status
Not open for further replies.

Corey

I Break Things
Staff member
Messages
34,553
Reaction score
204
Points
63
Please, if you are going to use the cron function in your cPanel do not set it to run every minute. I really can not think of any good reason that you would need a cron to run EVERY minute. Also, please do not set them if you're not going to use them!

If for some reason you need your cron to run every minute please contact me otherwise I will be suspending people that are doing this. Can you imagine what would happen if 1,000 people all wanted to run a cron every minute? Yeah.. not good :)

-Corey
 

Chris Z

Active Member
Messages
5,603
Reaction score
0
Points
36
Haha, ya I can't see why anyone would need to run a cron tab every minute either. That's good that you're trying to keep the resource use down though. :-D
 

nol888

New Member
Messages
292
Reaction score
0
Points
0
I myself can't see why you'd REALLY need a cron to run at all, it's just a web hosting service.

Well, maybe you can use it for automated backups or something.
 

lionheart8

New Member
Messages
177
Reaction score
0
Points
0
I myself can't see why you'd REALLY need a cron to run at all, it's just a web hosting service.

Well, maybe you can use it for automated backups or something.
Well, there are many legitimate uses for cron like if say one is using rss to get news - to keep the database up to date, or one has a search function & many other functions e.g. on a community or similar site (at least for Drupal CMS). These however can be set to be managed by a cron Drupal module. My cron runs once an hour.

As Corey says the problem is not using cron, but making it run too often.
 

Brandon

Former Senior Account Rep
Community Support
Messages
19,181
Reaction score
28
Points
48
Another good reason for a cron is on the status site, there is a cron every 15 minutes that updates the cached server status.
 

toofani

New Member
Messages
33
Reaction score
0
Points
0
Well, there are many legitimate uses for cron like if say one is using rss to get news - to keep the database up to date, or one has a search function & many other functions e.g. on a community or similar site (at least for Drupal CMS). These however can be set to be managed by a cron Drupal module. My cron runs once an hour.

As Corey says the problem is not using cron, but making it run too often.
thats true..there is no need to run every mint..is it??:dunno::nuts:
 

zmama

New Member
Messages
54
Reaction score
0
Points
0
I have a question about this. I'm hosting a very small game, and run a cron job to update the stats for the game. What would be an acceptable number of minutes to run the cron job? Right now I run it every 5 minutes (I was testing to try to fix a problem). This often is better for the game, but every 10 or 15 would work, too. Is that acceptable? Don't want to use too many resources. :D

Thanks!
 

Corey

I Break Things
Staff member
Messages
34,553
Reaction score
204
Points
63
Every 5 minutes is fine.
 

kajasweb

New Member
Messages
1,723
Reaction score
0
Points
0
I'm running Drupal 5.2 in my site. I need to run a cron every 12 hours. But, the notification just states Fatal Error, Memory exhausted. Why is it so? Can you please raise the memory limit of 8 MB to something higher..

Thanks in advance..
 

One ofMany

New Member
Messages
13
Reaction score
0
Points
0
hi,
I don't know php but am trying to learn and I have generally avoided java and batch in the past because they use double brackets and such
(op/machine code, ųcontrollers and basic (vb/access) is/was my thing) -
so I don't know what 'cron' is.
If , by stating that alone, I am waisting this forum's space/time - then you should tell me to 'forum else where' or 'google it first' before bringing it onto this forum. No disrespect to you's - there are many forum sites for many topics.

setTimeout("window.location.replace('chatlog.php')",60000);

I believe this is a one minute thingy in my comment page.
Q: Is this acceptable?
 
Last edited:

Corey

I Break Things
Staff member
Messages
34,553
Reaction score
204
Points
63
OneOfMany -- That doesn't seem to be a cron so wouldn't apply to this.

This post only applies to people setting scripts to run by themselves at one minute intervals.

-Corey
 

xprtweb

New Member
Messages
30
Reaction score
0
Points
0
Hi,
I am not conversant with the details about cron, as where i encounter, like on my Drupal sites, it is managed by a module.

Today, however when I started testing a community site script I found, it required setting this up as part of the initial installation process:
0 0 * * * /usr/local/bin/php -q /home/username/public_html/dolphin/periodic/cmd.php
*/10 * * * * /usr/local/bin/php -q /home/username/public_html/dolphin/periodic/notifies.php
*/10 * * * * /usr/local/bin/php -q /home/username/public_html/dolphin/periodic/tags.php

Does any of those fall within the every minute category? I am yet to check to see what those characters b4 the command/file name stand for.

If so, let me know and ... ummmm will need to come up with what to replace it with.

Regards
 
Last edited:
Status
Not open for further replies.
Top