In this post, we will show you a quick guide to create a cronjob on your website. In this case, we are using the native cronjob system of our cPanel. So, let’s begin.
How To Create A Cronjob In cPanel?
First of all, you may want to log in to your cPanel. For this tutorial, we are going to use a free web hosting called ProFreeHost.
Now, search for the cron jobs and open the section in a new tab.
You will see a section like this.
All we need is figure out our cron interval and path to the script. In my case, I would like to run a .php script with interval 2 minute.
If you are holding your script in any subdirectory, you may want to enter the exact path to the script. Also, don’t forget to enter the file extension.
After that, you can see cronjob is activated and running now.
This is the best guide to create a cronjob for your website. We hope you enjoyed the post. If you did, please consider sharing our post with your friends. It will help them and also us to grow.