Hello Friends,
In this blog, I will teach you how you can set up the Cron Jobs in the server from the Magento tutorial.
Why do you need to set up the Cron Jobs?
The Cron job provides you to run a specific command at times set by the job. Let’s take an example, you want to delete temporary files every day/week so that your disk space did not become full. Every Magento certified developer prefers this to customize.
Quick Tip:- Learn Migration From Magento 1 to Magento 2
How to configure Cron jobs?
Every server has Cron Job functionality, we assume you are using the Siteground server. First, you need to log in to your Siteground account > My Account > Go to cPanel > Advanced > Click on the Cron Jobs icon.
Here, you can see the screen like this:

Do the below steps:
1) Add your email id in Cron Email field
2) In “add new Cron Job section”, set the Common Settings for once per 5 minutes option.
3) In the command input box, we need to set up 3 Cron commands one by one for our Magento 2 instance.
A) 1st command:
=> Add below command in the command input box.
/usr/local/php70/bin/php-cli /home/<USERNAME>/<MAGENTO PATH>/bin/magento setup:cron:run >> /home/<USERNAME>/<MAGENTO PATH>/var/log/setup.cron.log
=> Here, just replace the Sitegorund username with <USERNAME> word and if you have installed Magento 2 in the directory like fashion/magento2 then replace it with <MAGENTO PATH> word.
=> Now, click on the Add New Cron Job button.
B) 2nd command:
=> To add 2nd command first follow step 2.
=> Add below command in the command input box.
/usr/local/php70/bin/php-cli /home/<USERNAME>/<MAGENTO PATH>/update/cron.php >> /home/<USERNAME>/<MAGENTO PATH>/var/log/update.cron.log
=> Now, click on the Add New Cron Job button.
C) 3rd command:
=> To add 3rd command first follow step 2.
=> Add below command in the command input box.
/usr/local/php70/bin/php-cli /home/<USERNAME>/<MAGENTO PATH>/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /home/<USERNAME>/<MAGENTO PATH>/var/log/magento.cron.log
=> Now, click on the Add New Cron Job button.
Using the above 3 Cron commands you will get all types of Magento 2 logs and you can able to perform your specific action as well.
Always keep in mind. Magento frontend developer or Magento backend developer always maintains necessary knowledge. Keep learning Magento development step by step.
Thanks for reading this post.