thanks for the reply.
i have added a cron entry to monitor the appln in the crontab file like this
0 0 * * * <path where appln file is present>
The appln will strt at 12 midnight everyday and has to stop by 10 PM the same day.
now i added another cron job for running a acript which wil monitor the appl till 10 like this
and which will be started some ten mins before 10 PM everyday
50 22 * * * <path of the script>
TIME_NOW=date '+%H:%M:%S'
if [$TIME_NOW == "22:00:00"] ; then
ps -ef |grep "<appl name> "
kill -9 | awk '$2'
exit 1
fi
But the problem here is allthe cron jobs are shown rnning as /usr/sbin/cron if i grep for cron.
So how do i kill my cron job?
I tried invoking a child job along with the first cron, get its parent id (which wil be cron job id) and kill it.
But that seems to be a round about way of doin it
help me with some soln
regards