P
P
PRAIT2018-04-05 14:16:28
Task Schedulers
PRAIT, 2018-04-05 14:16:28

Magento how to deal with Cron?

Hello everyone, I'm asking for help with the Magento 2 CMS.
I'm trying to install a module in Magento through the Magento Marketplace, but I get this error:
5ac60474ae7ad045608957.png
OS: Windows 8.1
What I just haven't tried, to be honest, I don't quite understand how to work with the command line, unfortunately. Here is a tutorial in a nutshell, on how to fix this error Magento Cron Tutorial
As I understand it, you need to somehow write these lines into the command line:

* * * * * <path to php binary> <magento install dir>/bin/magento cron:run | grep -v "Ran jobs by schedule" >> <magento install dir>/var/log/magento.cron.log
* * * * * <path to php binary> <magento install dir>/update/cron.php >> <magento install dir>/var/log/update.cron.log
* * * * * <path to php binary> <magento install dir>/bin/magento setup:cron:run >> <magento install dir>/var/log/setup.cron.log

But what did I not do. The command line gives "Error", "Permission denied", "Not recognized as an internal or external command, executable command or batch file". I don't know what to do anymore.
I googled, didn't find anything. Please help install =)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
imdeveloper, 2018-04-05
@PRAIT

Specifically with regards to your case on Xampp, this is done like this:
-First of all, find the location of php.exe. Usually, when in Xampp, it is located on the drive: \xampp\php, for example, c:\xampp\php
- Go to this folder and create a mycron.bat file and add the following content to it:

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

Replace paths to php and magento with your own
- Save file and run in console
schtasks /create /sc minute /mo 5 /tn Magento\Cron /путь_к_папке_с_крон_файлом\mycron.bat

- Create a task: go to the task scheduler "Administrative Tools" via "Control Panel" > "System and Security".
and create a task as in the picture:
1) In the left column, select Magento
2) Select cron
3) On the right side, select properties
4) Select edit group or user
5) Enter username and click check names
Save and after that cron will run every 5 minutes

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question