Add a server cron-job: Kinsta
If you are using Kinsta for hosting your website there are two ways to set up a cron-job for your website.
First you need to run through the Groundhogg cron setup to make sure the files are put in your website. If it can’t automatically install a file then download it manually to use.
Ask Kinsta support to do it for you
If you are unfamiliar with how to use SSH and writing the crontab language, then we suggest you contact Kinsta support and ask them to set up the cron-job’s for you.
First tell them you would like them to set up cron job’s for you, and give them the website that you are using Groundhogg on.
You would like them to disable the internal cron job, and set the wp-cron.php file (it was automatically downloaded by Groundhogg and put in your website or attached to this ticket) to run every 5 minutes.
You would like them to set up the gh-cron.php file (which could be automatically downloaded and put the file in your website or you have attached) to run every 5 minutes.
If you are using AWS for sending the emails then you also need to ask them to set up aws-cron.php (which could be automatically downloaded and put the file in your website or you have attached) to run every 5 minutes.
Notice how we say that the files may be attached, this is because Groundhog may not be able to put the file in the correct location. Which is why you can manually download the files and include them in the support request. This is done to ensure that their support team can set it up for you quickly. You can attach the files by using the paper clip icon when contacting them.
Read over your entire support request, ensure that the files are attached (if Groundhogg couldn’t put it in your website) then submit the request.
Kinsta’s team will then work to set these up for you and hopefully will let you know when the cron job’s are set up.
You should now be able to go to the cron setup in Groundhogg and it should show that it’s all working.
Set it up yourself using SSH and crontab
If you have experience with SSH and using crontab then you can set these up yourself. If you don’t have experience with either of these then please see the above step and ask Kinsta support to set it up for you, as you could really mess up your entire site if you don’t know what you're doing.
What you want to do is SSH into your site then run crontab -e (code block), and select your favourite code editor (we prefer nano but you should select what you know best).
Now that you're editing crontab, you want to go to the very end of the file.
You want to wp-cron.php to run every 5 minutes. Wp-cron.php should be in the root folder of your website, if it isn’t, you will need to adjust the statement.
Then you want gh-cron.php to run every 5 minutes. Gh-cron.php should be in the same folder that wp-cron.php is in.
If you are using AWS for sending emails, you will need it to run every 5 minutes as well.
If you are unsure if you have the right crontab statement then you can use https://crontab-generator.org/ to create the statement for you.
Once that is done, save it (you will get a message saying crontab is installing new crontab, so give it a minute before continuing), then exit the ssh connection.
You should now be able to go to the cron setup in Groundhogg and it should show that it’s all working.