we have a batch data processing script inside a container and want to check it is alive and actually working or whether it should be restarted.
It is PHP command line script and doesn't expose any kind of server. Currently running in Docker soon in Kubernetes.
How can we monitor liveness of such script without introducing unnecessary features/libraries?