I want to create a cronjob that runs jpegoptim and optipng everyday, to optimize images in my Magento install. I want to run this on my CentOS 7 install.
Therefore I edit /etc/crontab with the following:
0 13 * * * root lockrun -Q -L .lockjpegoptim -- find /media -iname *.jpg -exec jpegoptim --max=90 --strip-all --all-progressive -p {} \; > /dev/null
0 13 * * * root lockrun -Q -L .lockoptipng -- find /media -iname *.png -exec optipng -o7 -preserve {} \; > /dev/null
I want to be sure that this is correct, will this run right?
Is there a way to check if the cron run succesfully?