CPU usage?

Status
Not open for further replies.

rtrackx1

New Member
Messages
6
Reaction score
0
Points
1
I am currently working on a project that will track conversion rates of two currencies at http://www.roblox.com/. This is to see when to trade for the best profit. I decided to use PHP and MySQL (Which I don't know much of) to do this. Someone was kind enough to give me an outdated version of the same project that he worked on in 2013. I need to fix it up, but I think I can do so within the next 6 months. To get to the point, I need to run a cron job every minute that will download the webpage that contains the trade currency rates and have a PHP script find the trade rate and store it. Will my CPU usage run empty if my website downloads a webpage every minute and find/store the rates? That is 1440 webpages to filter and store per day.

Thanks,
Cameron
 

AngusThermopyle

Active Member
Messages
319
Reaction score
52
Points
28
1. Free Hosting accounts rule is five minutes between cron runs. No exceptions

2. Web scraping or an API? That is, does the script use an method approved by the website you are getting the data from? Repeatedly grabbing a dynamic page from a website is a good way to generate complaints.

3. As for CPU usage, what you describe is not that CPU intensive (especially if it only runs once every 5 minutes and IF the code is efficient)
 

rtrackx1

New Member
Messages
6
Reaction score
0
Points
1
1. Free Hosting accounts rule is five minutes between cron runs. No exceptions

2. Web scraping or an API? That is, does the script use an method approved by the website you are getting the data from? Repeatedly grabbing a dynamic page from a website is a good way to generate complaints.

3. As for CPU usage, what you describe is not that CPU intensive (especially if it only runs once every 5 minutes and IF the code is efficient)
They wouldn't have a problem with web scraping; Their website has millions of active players and they wouldn't notice a significant difference in traffic if I they get one more page visit on the trade currency page every 5 minutes.
 

caftpx10

Well-Known Member
Messages
1,534
Reaction score
114
Points
63
You could as a workaround set up a cron job on your own computer (preferability one that'll stay on) to visit a script every minute that'll update the stats.
I believe the main reason why the cron job every five minutes or above is in place is because of the CPU usage, so hopefully the method I've mentioned should be okay.
 

rtrackx1

New Member
Messages
6
Reaction score
0
Points
1
I think I could make a script from scratch that has a loop that does everything for me every minute so that I'll not need a cron job.
 

AngusThermopyle

Active Member
Messages
319
Reaction score
52
Points
28
I think I could make a script from scratch that has a loop that does everything for me every minute so that I'll not need a cron job.

Good way to get your site suspended.

Space provided by x10Hosting is to be used to create a functional website, we do not allow bots, content scrapers, or any other script that runs continuously on your account. Any scripts that are executed via cron or manually must be directly related to your website.
 

bdistler

Well-Known Member
Prime Account
Messages
3,534
Reaction score
196
Points
63
and there is a "Max Execution Time" limit of 30 seconds
 
Status
Not open for further replies.
Top