Why crontab not working?

Couple of days ago I wrote a post Stop ubuntu from Hibernating, fixing crontab but the problem wasn’t solved. Cron was running (I checked the log) but my python script wasn’t being executed.

What I found out was when putty session to my server is closed the home directory is unmounted, I believe. My home directory contained all my python scripts.

The cron was trying to run scripts that didn’t exist, so nothing was happening. So what I did was move all my python scripts to the directory /var/ and changed the crontab to execute scripts that are located in there and I hadn’t had any issues since.