php - How to write a Batch/CMD file to check every 5mins if process stops then execute url? -


so use php execute ffmpeg video conversions , save me manualy executing url trigger video conversions figured possible batch/cmd script.

the process in question named ffmpeg.exe

and url need execute following : website/index.php?option=com_hwdmediashare&task=maintenance.process&format=raw&token=lol

i need check if ffmpeg.exe running every 5 minutes if not execute url or perhaps thinking may more simple launch url through php.exe itself.

i did way.

:loop @echo off tasklist /nh /fi "imagename eq ffmpeg.exe" | find /i "ffmpeg.exe" >nul && ( echo ffmpeg running ) || ( echo ffmpeg not running c:\php\php.exe -f "c:\public_www\administrator\components\com_hwdmediashare\cli.php" process ) timeout /t 300 /nobreak >nul goto loop pause>nul 

hopefully nobody sees issues code ? think may have problem on time memory usage of cmd.exe high if knows how fix ?


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

django - CSRF verification failed. Request aborted. CSRF cookie not set -