Mack and James both reported an issue with the 5-minute window.

This changeset should more accurately check the times the script has last executed,
and base its decisions off of everything in the file instead of just the first
line.