i have a simple php worker script which is running in the background.
i use a monitor script to make sure that this worker script is indeed running.
the monitor script is running on crontab.
i would like restart the worker process every now and then, using linux kill.
however this create a problem, which is that the worker script might lose the data which is currently handling, if stopped abruptly.
in .net for example, with winforms, u can simply implement on_form_close, how do i accomplish the same with php (linux,ubuntu)?
thanks