#!/bin/sh echo "simcheck.sh begins" date ps aux | grep -v grep | grep simcheck > /dev/null if [ $? eq 2 ]; then echo "xxx.sh is running, this scheduled task will be skipped." exit 1 fi echo "xxxx.sh is not running, this scheduled task will proceed." /home/actonia/source/simcheckSuberver/actonia-subserver-simcheck/simcheck.sh echo "simcheck.sh ends"