code to exit job-daemon if topology code still running
changes for cron environment problem