I have so far been unsuccessful in setting up a cron in Hostinger. These are the three options I've set up so far. I think the path in the second one is incorrect but I was expecting either the first or third one should work?

Screenshot of cron jobs

I also tried putting the command in a file that is called by the cron, but it didn't like the cv.phar or drush commands. The only error messages I'm getting now are time zone notices (e.g. like the timezone error reported here)

Has anyone successfully set up a cron in Hostinger (shared hosting)?

  • I've not used Hostinger but I'd try cv first
    – Aidan
    May 5, 2023 at 9:37
  • I don't think I've got permission to install cv - I've tried but I keep getting permission denied. May 5, 2023 at 12:31

1 Answer 1


Have you resolved your issue on Hostinger? I'm facing the same challenge.

After creating my PHP type cron job in Hostinger, I added a simple echo command at the very beginning of CiviCRM's cron.php and saw it in the output results, therefore I can see the file is being called by cron. However, if I move my echo command below the first line require_once '../civicrm.config.php'; I don't see my echo any longer. That file does exist in the parent folder so not sure where it's failing but I'm still digging.

UPDATE (Solved!)

TL;DR - If you have WordFence, it may just be as simple as turning off WordFence's reCAPTCHA on the login and user registration pages.

After what seems like an eternity of troubleshooting and hundreds of attempts using various commands, here's what I found that resolved my issue, skipping the gritty details of my troubleshooting steps...

  1. I first created a new WordPress subscriber user making sure the password was super long and without any of the reserved characters as outlined on CiviCRM's page. To keep things a little more secure, there are other special characters you can use in the password.
  2. I then replaced my PHP cron command with a wget command, passing in username/password/site_key variables with the command similar to the one in your first screenshot. I grabbed my sitekey from wp-content/uploads/civicrm/civicrm.settings.php.

Feel free to copy/paste the command below replacing YOURSITE.COM / USERNAME / PASSWORD / SITEKEY with your own values:

wget -O - -q -t 1 'https://YOURSITE.COM/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=USERNAME&pass=PASSWORD&key=SITEKEY'
  1. I then found what might be the actual problem. Wordfence reCAPTCHA was preventing me from running the command. Once I turned it off, my scheduled civi cron job began running without any issues. So, try unchecking Enable reCAPTCHA on the login and user registration pages found under the Login Security section.

I'm still going to play with this until I'm 100% satisfied because this solution only has me about 90% satisfied... I'll need to sleep on this some but at this point, it's working.

  • unclear to me whether to let this stay as an Answer or convert to a Comment. @bloodstripe - i will leave this as is in case you get some breakthrough that means you can edit it to be an Answer (and understand you may not have the credits currently to comment)
    – petednz - fuzion
    Oct 29, 2023 at 20:15
  • 1
    That's exactly it, I'm too new and don't have enough rep to comment. I'll be sure to edit my answer once I figure it out. Thanks for the understanding. Oct 31, 2023 at 11:56
  • 1
    You will add to your reps (I think) if you post your issue as a separate issue and reference this one.
    – petednz - fuzion
    Oct 31, 2023 at 17:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.