Need help with cron job

Avatar
  • Answered
Yesterday I followed the instructions on this page:
https://www.inmotionhosting.com/support/website/wordpress/review-wordpress-login-attempts
I copied this (egrep "POST .*wp-login.php" ~/access-logs/example.com | awk '{print $1,$4,$5,$6,$7,substr($0, index($0,$12))}' | awk '{print $1}' | sort -n | uniq -c | sort -n | sed 's/[ ]*//') into the cron job, changing "example.com" for the domain of my multisite wp installation.
Today I received an email saying grep: /home/blah-blah/access-logs/example.com: No such file or directory

Can you assist setting up the correct cron job?

Thanks.
Avatar
anonymous
Hello,

I took a look at your cronjob and it failed as that file does not exist. Please keep in mind that addon domains in the access logs directory are shown as addon.primary.com. I have corrected the cron job already and you should have no more problems.

Best Regards,
TJ Edens