Help - Search - Members - Calendar
Full Version: Crontab tasks
Hostony Board > General Support > General Support
tresuvesdobles
I just wanted to check that I can program in the crontab a PHP script that will cause the following load in the server:

* 480 XML files (8kB each one) executed once a day
* 100 XML files (8KB each one) executed every 15 minutes
* 3 XML files (0,7kB each one) executed every 5 minutes

I suppose there should be no problem (in addition Apache is not working while the files are downloaded, so the task is not continous) but I want you to confirm in order to be sure that it is OK for the AUP.

Thanks in advance
Stanly
No, it is not ok.
You need to have minimal a vitrual dedicated server to do this.
As I know you're thinking abount upgrading to private server.
If you will do this you will be allowed to run that script.
tresuvesdobles
Finally I will move, as a apreliminary step, to a Reseller Linux + Special Windows plan as agreed with Serge. Not to Dedicated yet (it will be a next step).

Regarding the task to be programmed in crontab, I can re-program everything so that the PHP script causes the following load (maximum load):

100 XML files (8kB each one) executed every 15 minutes

Is this acceptable for my current plan? And for the Reseller plan once upgraded?

Thanks
Vanya
We'll need to test it. I can't say what load will it create without any tests...
tresuvesdobles
OK then. I will program it and let you know, right?
Vanya
Yes.
tresuvesdobles
I have just programmed at my account in 67.15.16.19 the PHP script http://cci.tresuvesdobles.com/actualitza.php for execution every 5 minutes. Please check and let me know if the load is acceptable.

Thanks in advance
artrocity
Not to be a busybody or anything but... rolleyes.gif

CODE
cens.log --> [2004-06-27 23:01:55] ACTUALITZANT ZONA DEL CENS: 1 de 3 del sistema 1
<snip>....
cens.log --> [2004-06-27 23:02:31] ACTUALITZANT ZONA DEL CENS: 10 de 3 del sistema 2


Thats 36 sec of CPU time every 5 min.

from the TOS:
Users may not initiate the following on our servers:
Run any process that requires more than 8Mb of memory space, more than 30 CPU seconds, or use more than 5% of all available system resources at any time.
tresuvesdobles
I don't know if the reply time (36 seconds as artrocity says) is understood as the CPU time. Could some support guy tell me about it?

In any case, it seems that I have not programmed the Cron task property since I got the following message in my mailbox every 5 minutes:

QUOTE
/bin/sh: line 1: http://cci.tresuvesdobles.com/actualitza.php: No such file or directory

How should I program it from CPanel X?

Many thanks
Niakie
Not a support person, but I can help in running PHP as a cron job. What you need to do is point to the php bin, then the php file you wish to run as a command line paramiter, as such:

CODE
/usr/local/bin/php  /home/????/public_html/actualitza.php


I hope that this helps
tresuvesdobles
Sorry but I did not understand...

What should I include in the Cron editor in my CPanel?

Many thanks, Niakie
bgp1
/usr/local/bin/php /home/<username>/public_html/cgi/actualitza.php

<username> is the username that you use to log into CPanel.
Niakie
yeah that lol
tresuvesdobles
Many thanks!

And one more question:

I am thinking of moving the main scripts to another site, so that the load in the server at Hostony is not high when programming a periodical execution. But...

Is it possible to program in the CronTab the execution of a page out of the server? I mean some external link such as http://otherdomain/scriptpage.php

How could I do that?

Thanks again
Stanly
No, it is impossible.
You need to set up crontab task for the main file at the another site.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.
IPS Driver Error

IPS Driver Error

There appears to be an error with the database.
You can try to refresh the page by clicking here