Page 1 of 1

will this ever end?

Posted: Fri Dec 10, 2004 7:00 pm
by josh
For all these people without cron jobs asking how they could simulate it, could they just do this:

Code: Select all

<?php
set_time_limit(0);
ignore_user_abort;
$x=true;
while ($x) {
  // Include commands to run
 include("commands.php");
  sleep(1);
}
?>
Would this just like run forever untill you kill the process?
lol

... or untill you go into commands.php and put $x=false;

Posted: Fri Dec 10, 2004 9:28 pm
by Benjamin
No, But this would... (as long as you keep a browser open)

Code: Select all

<?php
sleep(1);
// run commands here
header("Location: http://www.thisdomain.com/thispage.php");
?>

Posted: Sat Dec 11, 2004 12:05 am
by josh
i meant like how would you make it so the script runs forever so we run it once and thats it, you could close the browser and it keeps running

Posted: Sat Dec 11, 2004 2:31 am
by kettle_drum
You just run what you have frm the command line. But it still might not run forever due to server setting and such. People should just learn how to use cron - its the easyist way to solve the problem.

Posted: Sun Dec 12, 2004 9:52 am
by josh
Yeah I know, I always do use cron, I'm talking about these kids that come to these forums who have a free host account and no access to cron and they want to simulate it.

Posted: Sun Dec 12, 2004 9:57 am
by timvw
pfff, they should learn to search the web then ;)

fe: http://www.webcron.org

Posted: Sun Dec 12, 2004 12:56 pm
by Roja
timvw wrote:pfff, they should learn to search the web then ;)

fe: http://www.webcron.org
Okay, I'll bite. What search terms did you use to find that? I've tried several combinations of web, cron, cronjob, free, and so on and never found that before.

Awesome site, and I'd love to have 2-3 more to be able to offer as a backup.

Posted: Sun Dec 12, 2004 1:44 pm
by timvw
i just knew there were such free services, so i typed: "free webcron" and i found that site... now i tried some other searches and i noticed it isn't that evident to find it... ah well, kudos to my memory ;)

http://www.bitfolge.de/pseudocron-en.html saves you the time of writing what you were planning ;)