Having PHP code run when no one's looking at your site

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
windwaker
Forum Newbie
Posts: 21
Joined: Sun Feb 13, 2005 11:18 am

Having PHP code run when no one's looking at your site

Post by windwaker »

Is it possible to have a php script run every day, or like set it to run at a certain time, or even have it always running?
User avatar
smpdawg
Forum Contributor
Posts: 292
Joined: Thu Jan 27, 2005 3:10 pm
Location: Houston, TX
Contact:

Post by smpdawg »

Do a search on this site for cron.
jmricker
Forum Newbie
Posts: 1
Joined: Sun Feb 27, 2005 8:00 pm

Post by jmricker »

smpdawg wrote:Do a search on this site for cron.
Depending on the type of server you are hosted on, you may not have access to cron. If don't have a shell access on a *nix type server then you wil have to do something else.

A way around not having access to cron is to put the script on your site that you wish to run once a day then use a cron-type program on your own computer to trigger the script on the site.
User avatar
smpdawg
Forum Contributor
Posts: 292
Joined: Thu Jan 27, 2005 3:10 pm
Location: Houston, TX
Contact:

Post by smpdawg »

I suggested the search on this site for cron because that issue has been covered in previous posts including alternatives if cron is not available.
Post Reply