c***@gmail.com
2008-03-27 17:07:02 UTC
Hi,
I have been trying to find a way to delete a file about 30 minutes
after it is created by a php script. I came up with the idea to use
exec() to give the following linux command "sleep 1200 && php
delete.php". Ofcourse you have to download and install the module php5-
cli for this to work. The problem I am getting in that php sits and
waits until the sleep command lets php run the delete.php script. Is
there a way that php can give a system command and not have to wait
for it finish?
Thanks,
Carl
http://www.gaihosa.com
I have been trying to find a way to delete a file about 30 minutes
after it is created by a php script. I came up with the idea to use
exec() to give the following linux command "sleep 1200 && php
delete.php". Ofcourse you have to download and install the module php5-
cli for this to work. The problem I am getting in that php sits and
waits until the sleep command lets php run the delete.php script. Is
there a way that php can give a system command and not have to wait
for it finish?
Thanks,
Carl
http://www.gaihosa.com