lanrat Asked: 2009-07-22 18:32:16 +0800 CST2009-07-22 18:32:16 +0800 CST 2009-07-22 18:32:16 +0800 CST Time based php script 772 Say I want a php script the run the function itstime() every hour. Other than setting up a cron job on the server how can I do this? Or is this not possible because php scripts need to be opened to be ran? Thanks. time php 3 Answers Voted Best Answer raspi 2009-07-22T19:14:24+08:002009-07-22T19:14:24+08:00 There's some web services doing this, for example http://www.setcronjob.com/ http://www.webcron.org/ Torandi 2009-07-23T05:42:58+08:002009-07-23T05:42:58+08:00 The only other way than to use cron or a webservice that runs cron is to use a workaround; each time the site is loaded by a user, check if it is more than an hour since last time and if it is, run the function. Not very pretty though.. asdmin 2009-07-29T03:37:38+08:002009-07-29T03:37:38+08:00 you can write a daemon in php, although it's overkill to cron, you can google for it
There's some web services doing this, for example
The only other way than to use cron or a webservice that runs cron is to use a workaround; each time the site is loaded by a user, check if it is more than an hour since last time and if it is, run the function. Not very pretty though..
you can write a daemon in php, although it's overkill to cron, you can google for it