Home Miscellaneous Issue with Magento cron job

Issue with Magento cron job

by SupportPRO Admin

You are getting the error message Error: cron job (cron.sh) error message: expr: syntax error because the commands included in Magentos cron.sh files are not portable.

To get it work you can change the following line in cron.sh:

if [ “$INSTALLDIR” != “” -a “`expr index $CRONSCRIPT /`” != “1” ];then

to something more portable:

if [ “$INSTALLDIR” != “” -a “`echo $CRONSCRIPT | sed -n ‘s/[/].*//p’ |
wc -c`” != “1” ];then

If you require help, contact SupportPRO Server Admin

Server not running properly? Get A FREE Server Checkup By Expert Server Admins - $125 Value

Leave a Comment