using variables in cron

unlike normal bash scripts, you can’t really use the back ticks to execute a certain command like so

DATE=`date +%F`

In crontab, you have to use the $(), eg

$(date +\%F)

Author: bpeh

Bernard Peh is a great passioner of web technologies and one of the co-founder of Sitecritic.net Website Design and Reviews. He works with experienced web designers and developers everyday, developing and designing commercial websites. He specialises mainly in SEO and PHP programming.