most of the time you want your commit messages to be meaningful, neat and sweet message. Sometimes you just want to commit like crazy - more as a backup process.
So, if you ever find yourself in a situation where you must commit automatically, here is how to do it with cron:
*/5 * * * * (cd /path/to/myproject && git add . && git commit -m "Automatic Commit")
Done. Happy coding.