As per your requirement,
The script has to check the process name by the command "ps -C ffmpeg" , and this script has to run every 2 minutes, every run it needs to check the time stamp of every process, if any of the process having the same value as same as the previous run, that PID's needs to be killed.
This can be achieved by fetching the output of time stamp of every process in a desired format to a file,
the next run the output of time stamp of every process will goes to another file with the desired format
Comparing the time stamp of every PID with old one, if the time stamp is same we need to kill that PID
after this run, the latest output file will become as old file by doing a small log rotation .
This entire task will be scheduled in cron and keep on running continuously every two minutes.
Hope I have understand your requirement
--- I have 10 years of experience in UNIX administration and in scripting to do automation, Scripting in my advantage which any repeated task can be aching by scripting.
The price is negotiable, Also I am looking forward many other projects from you , so that we can wok together with better pricing .
Regards,
Roselin John
+91 9444357718