There are many ways. Popular one is to use a lock file.
1) When the script starts, it checks if a lock file (like
/var/lock/powtac.loc) already presents.
2) If it does exist, script aborts, assuming the previous script is still running *).
3) If it does not exist, script creates the file and continues to do whatever it needs to do.
4) Upon exit, script deletes the lock file.
*) It would also be possible to check the process list at this point, search for matches for your cron job and if found, see when they were started. If recently, then assume they are still running, if loooooooooong time ago, then assume they were stuck.