Magento 2 Cron Job – How to Set Up Cron Job in Windows

cronmagento-2.1magento2windows

How can I set up Magento 2 cron jobs to work on a Windows server?

I can make the cron tasks run in a similar way to this or by calling the file directly (as far as I can tell this works).

yoursite.com/update/cron.php

However when trying to do extension installs Magento thinks that the cron process is not running (Magento docs on this issue). How can I make it know it is running?

Best Answer

If you want to run cron job directly without having to wait for the schedule, you can use

n98-magerun2 sys:cron:run <job name>