*** giangiammy escribió/wrote (7 Sep 2006 05:32:49 -0700):
I don't know if this is possible, but I need to accomplish an action
at a given hour (what cron does): is it possible to do something like
this having a web hosting service with php support?
any other possibilities to do something like this without having
access to cron facilities?
If the schedule is flexible enough and you just want to do it "once a day"
and the like... and taking for granted you do have a web site... A possible
approach is to launch the script from your site. Let me explain:
1) You put your code in a file
2) You choose a page on your site (or maybe an include file)
3) You get a random number and decided upon it whether the script will be
launched
// Not tested!
if(mt_rand(1, 1000)){
system('nohup /foo/var.php &');
}
You can make additional checks so it won't be executed in less than X
hours.
--
-+
http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web:
http://bits.demogracia.com
+- Mi web de humor con rayos UVA:
http://www.demogracia.com
--