hi,

My hosting provider doesn't allow be to have cron jobs running. But I need to perform a background task every 30 minutes.

Can I simulate a cron job in PHP?

I thought I can include something like:

if ((time(now) - $lasttask)> 30 minutes){
include("task.php3")}

*don't mind the syntax, haven't checked it yet.
*$lasttask (time) could be read from a database or file.

*****ty thing is that on every pagevisit this query should be run (or on every 10th or 1000th depending on the #visitors)

*can i also include or call a cgi script (which returns no result)? ie include("/cgi-bin/task.cgi")?


Or maybe there is a much better way to simulate a cron job in PHP...?

thanks for any reply,
Quazzy