0

HI
I want when somebody comes to my site and go out from it , a certain page still execute by the server and continue to do it's work.
Is it possible to execute some codes after the user close it by the server ?
Thanksv

4
Contributors
6
Replies
7
Views
7 Years
Discussion Span
Last Post by kireol
0

a couple ways to do this would be to

1) Good way: Call a system command with php http://php.net/manual/en/function.system.php

2) Better way: Save a file to the server in your php script. Have a cron job check for that file, if it exists, run the command. This is a better way as you don't have to deal with time out issues.

0

cron jobs?

Scheduled executions of commands, on a Unix based system.
The Windows equivalent would be the Task Scheduler.

I would have to agree with kireol.
If you want something done without an outside request, it is usually best to schedule it using Cron.

0

Thanks all,But my host doens't support cron.Is there any other solution for it or something like cron?

0

-move to a host that supports cron or task manager

-try system command and see if that will work for you


or
-use a different server to process what you need to run that does support cron/task mgr

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.