Always use absolute path for cron job

Always use Absolute Path for your cron job. Yes, that lesson is another thing I learn from latest Godaddy case.

Temporary solution I use for bad malware that attack my client website is create shell script that overwrite bad .htaccess file with good .htaccess file. By implement this temporary solution downtime for client websites drastically suppressed by.

Until I check my email where I set the report send to. I miss 31 job because system can find shell file.

Yes, I use relative path for cron job. I only set absolute path for program location like /bin/bash for bash location etc. I never see this fail before, mayble because I implement it on virtual private server or dedicated server that use special resource.

Quick solution for this situation is using $HOME. Just add that variable in front of file name and you’ll get perfect cron job.

Simple as 123 🙂