Cron Setup Instructions for Windows Magento 2

Cron Setup Instructions for Windows Magento 2Cron Setup Instructions for Windows Magento 2


Hi Magento friend today's i'm share How to Cron Setup on Windows Magento 2


First of all, find location of php.exe – Generally where Xampp is installed, it’s in Drive:\xampp\php e.g c:\xampp\php

 

1) Go to a folder and create a file named magentocron.bat


2) Edit this file and paste 3 lines shown below:


C:\xampp\php\php.exe C:\xampp\htdocs\magento\bin\magento cron:run

C:\xampp\php\php.exe C:\xampp\htdocs\magento\update\cron.php

C:\xampp\php\php.exe C:\xampp\htdocs\magento\bin\magento setup:cron:run


3) Save the file, open command prompt and enter following command:


schtasks /create /sc minute /mo 5 /tn Magento\Cron /tr path\to\bat\file\magentocron.bat

 

  1. Now click on Start –> Control Panel –> Administrative Tools –> Task Scheduler.
  2. Expand Task Schedule Library from the left hand column and click Magento.
  3. Select Cron from the middle pane, click properties from the right pane under selected items.
  4. Under Security Options, click the Change User or Group button.
  5. Now in the current window, enter System username in the object name box and click check names. Click OK to close the User window, and OK to close the Cron properties Window, and close Task Scheduler.


Cron job setup is successful and it will run every 5 minutes.

php bin/magento cron:run


Deepak Kumar Bind

Success is peace of mind, which is a direct result of self-satisfaction in knowing you made the effort to become the best of which you are capable.

Post a Comment

If you liked this post please do not forget to leave a comment. Thanks

Previous Post Next Post