I have a script that which echo some content and close the connection to the client, However it will work background to process some emails.
Is there any possible way to track the status of the background process ? i mean its completed,or still running etc.
Currently i am setting a flag on DB on process start and process end. But i afraid that some times the script may fail in some conditions.
EX. A force termination from server host.
also is there any possible way to trigger a function when the script stopped execution ( through exit,force stop whatever.. )
I am running the script in windows/linux servers, and both are shared hosts and doesn't have CRON,Task Scheduler support.
Thank you.