linux - How to check if immediate previous run failed or not? -


i have perl script runs , checks.
in cases script fails , stops processing , in others completes.
able check if script run within 1 minute , if run successful somehow exit.
thought saving file or checking $?, indication thought there may exist standard clean approach this.
solution work both linux , mac

you see if script has ended after minute trying :

sleep 60 ps -ae | grep yourscript.name 

this has executed @ same time script(s). if returns nothing, means script isn't running anymore, aka has ended.

for final result, make perl script write specific log file, , check end of log file if ps -ae | grep yourscript.name returned nothing.

hope helped !


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -