Automatic execution of php script

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
K-Z
Forum Commoner
Posts: 29
Joined: Mon Jul 05, 2010 9:03 am

Automatic execution of php script

Post by K-Z »

Hi...I just want to know that is automatic execution of any php script at a particular time managed by server level coding or it is to be coded by us?? If we are to manage it...then how ???

Example if I have a php file A.php which I want to get executed at 5:00 AM everyday....how should I manage it?? Is it done by the server controller or we are code for it??
User avatar
AbraCadaver
DevNet Master
Posts: 2572
Joined: Mon Feb 24, 2003 10:12 am
Location: The Republic of Texas
Contact:

Re: Automatic execution of php script

Post by AbraCadaver »

K-Z wrote:Hi...I just want to know that is automatic execution of any php script at a particular time managed by server level coding or it is to be coded by us?? If we are to manage it...then how ???

Example if I have a php file A.php which I want to get executed at 5:00 AM everyday....how should I manage it?? Is it done by the server controller or we are code for it??
If on Windows there is the Task Scheduler and on Linux you would use cron.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
K-Z
Forum Commoner
Posts: 29
Joined: Mon Jul 05, 2010 9:03 am

Re: Automatic execution of php script

Post by K-Z »

AbraCadaver wrote:
K-Z wrote:Hi...I just want to know that is automatic execution of any php script at a particular time managed by server level coding or it is to be coded by us?? If we are to manage it...then how ???

Example if I have a php file A.php which I want to get executed at 5:00 AM everyday....how should I manage it?? Is it done by the server controller or we are code for it??
If on Windows there is the Task Scheduler and on Linux you would use cron.
So....it is coded or managed by the organizations which give web-space for rent to others who want to upload their websites... :roll: :roll:
User avatar
AbraCadaver
DevNet Master
Posts: 2572
Joined: Mon Feb 24, 2003 10:12 am
Location: The Republic of Texas
Contact:

Re: Automatic execution of php script

Post by AbraCadaver »

Yes. If you are buying web space from a hosting provider then they control this. Some may give you a way do this in a control panel for your account, or if you have ssh access you may be able to control this. However, some hosts do not provide any capability to do this.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
K-Z
Forum Commoner
Posts: 29
Joined: Mon Jul 05, 2010 9:03 am

Re: Automatic execution of php script

Post by K-Z »

AbraCadaver wrote:Yes. If you are buying web space from a hosting provider then they control this. Some may give you a way do this in a control panel for your account, or if you have ssh access you may be able to control this. However, some hosts do not provide any capability to do this.
Thnx.that is helpful...
internet-solution
Forum Contributor
Posts: 220
Joined: Thu May 27, 2010 6:27 am
Location: UK

Re: Automatic execution of php script

Post by internet-solution »

Or you can try one of the two poorman's cron options:
1) If you have regular visitor at your site then you can execute the code when someone visits your index.php. or
2) On your windows PC you can schedule a task, so that it calls the php file via your internet browser at specified time.
K-Z
Forum Commoner
Posts: 29
Joined: Mon Jul 05, 2010 9:03 am

Re: Automatic execution of php script

Post by K-Z »

internet-solution wrote:Or you can try one of the two poorman's cron options:
1) If you have regular visitor at your site then you can execute the code when someone visits your index.php. or
2) On your windows PC you can schedule a task, so that it calls the php file via your internet browser at specified time.
Thnx again..... :D :D
Post Reply