Cron Job

Status
Not open for further replies.

lindsay2

New Member
Messages
5
Reaction score
0
Points
1
How often am I allowed to run cron jobs?


Thank you all for the amazing hosting.
 

xweb3x10

Member
Messages
34
Reaction score
1
Points
8
It's possible to run them as frequently as every five minutes but the real concern is the system resources they will consume (e.g. cpu seconds per hour). If you run a script that exceeds your allotted resources at best you're going to be shut down until the top of the hour, or at worst have your account suspended.
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Cron jobs must be scheduled so that they do not go off less than 5 minutes apart.

So, any one job can run every 5 minutes, not 4, 3, 2 or 1 minutes.

If you have two jobs, A and B

A can run at 0, 10, 20, 30, 40, and 50 minutes past the hour.
B can run at 5, 15, 25, 35, 45, and 55.

You cannot have A run at 0 and 30 minutes past the hour and B at 2 and 28 minutes past the hour.
 

xweb3x10

Member
Messages
34
Reaction score
1
Points
8
is there anyway I can monitor my scripts usage?
I wondered the same thing: https://community.x10hosting.com/th...and-overhead-tos-cpu-seconds-per-hour.191615/
The zipping process is what will be using the majority of your CPU -- file compression and uncompression are generally very CPU-intensive operations. Beyond that, there are ways to profile your own scripts to see how much CPU they are using if you simply must know the numbers. If you want general knowledge of X is more expensive than Y, Google goes a long way towards that.
 

lindsay2

New Member
Messages
5
Reaction score
0
Points
1
Thank you for all your help; I will start Googling myself.

It's really import to me to be very accurate as I will run this script as often as possible and I would really rather not sign up for premium hosting.

Currently the script/s are in development but they are to do this.


Monitor information from an API store the information in an SQL database, I really want this running every 5minutes, less would have been preferable though.

Another script is then to run looking over the information and post key information to twitter.

I really have no idea how intensive these tasks are, I've done everything do far though REST.

I can't imagine that it would put much pressure on the server at all but I would love it if I could check my scripts.
 
Status
Not open for further replies.
Top