Page 1 of 1

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

Posted: Sun Feb 27, 2005 4:33 pm
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?

Posted: Sun Feb 27, 2005 4:37 pm
by smpdawg
Do a search on this site for cron.

Posted: Sun Feb 27, 2005 8:13 pm
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.

Posted: Sun Feb 27, 2005 8:39 pm
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.