10
votes
catalog_product index does not exist yet. Make sure everything is reindexed
Please check https://github.com/Smile-SA/elasticsuite/issues/318#issuecomment-435322698, that fixed it for me. As this is a bit old, the command should be :
bin/magento config:set catalog/search/...
8
votes
how to stop cron job runing in magento 2
You can by running cron remove command:
php bin/magento cron:remove
It will only remove cron tasks from crontab but not the exact cron codes/files.
If you wish to run the cron jobs again, you ...
7
votes
Magento 2 - Test cronjob from browser
You may follow the steps below to test a cron job from browser.
Step 1)
Create a PHP file names "cronLaunch.php" under your project root directory
FIle: cronLaunch.php
<?php
use Magento\...
6
votes
Accepted
Magento 2 - Cache warmer for multiple server
In local cache environment it is impossible to create cache for both servers while executing cron on one server.
There is only one option left, make cache centralize.
To do this you need to use ...
5
votes
Accepted
Magento 2: How override native crontab.xml
Best way is to add this kind of record for core_config_data table :
path : crontab/default/jobs/get_amazon_capture_updates/schedule/cron_expr
value : 0 1 * * 1
scope: default
scope_id: 0
You have to ...
4
votes
Magento 2.2.8 - sitemap.xml contains "pub" DIR in the URL, It should be without "pub" directory in the URL
The reason is the way getBaseUrl function implemented on Magento\Store\Model\Store.
public function getBaseUrl($type = UrlInterface::URL_TYPE_LINK, $secure = null)
{
...
...
4
votes
Accepted
How to get bundle product price by product id ? Magento2
Please try this:
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$product = $objectManager->create('Magento\Catalog\Model\Product')->load($product_id);
if ($product->...
3
votes
Accepted
How i Can Schedule A cron Job on the Basis of Admin Configurations Values
Maybe this is your idea, you should create a configuration:
crontab.xml
<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="...
3
votes
Unable to send emails. Could not acquire lock for cron job: sales_send_order_invoice_emails
I guess Magento cron job is stuck in "running" status. Need to kill the stuck cron job then it will continue as scheduled.
Log in to your account using SSH.
Run the following command to ...
3
votes
how to stop cron job runing in magento 2
Run this command in magento root CLI
php bin/magento cron:remove
NOTE : This command has no effect on cron jobs outside the #~ MAGENTO START and #~ MAGENTO END comments in your crontab.
and to do ...
3
votes
Accepted
Magento 2 - How to get Base URL in cronjob
I think before calling getBaseUrl() you need to set your current store then you can get correct URL.
$this->storeManager->setCurrentStore($storeId);
Where $storeId is your store Id which you ...
3
votes
Accepted
Magento 2.3 How to automate custom cron job from custom module?
First you need to create your cron in Cron directory
app/code/Vendor/Module/Cron/Mycron.php
namespace Vendor\Module\Cron;
class Mycron
{
protected $logger;
public function __construct(
...
3
votes
Magento2 Cron job for sending mail not working
This library helps to identify the issues.
Run the below commands in the Magento root directory to download the n98-magerun2.phar.
wget https://files.magerun.net/n98-magerun2.phar
Then trigger your ...
3
votes
Magento 2 - Test cronjob from browser
I recommend you to use n98-magerun2 https://github.com/netz98/n98-magerun2
. After you give the n98-magerun2.phar execute permission you could run
Get all available cron job list.
./n98-magerun2....
3
votes
Magento2: How to check if cron job is working or not?
You can check all the cron jobs in any status in the table cron_schedule:
Inside you can look for your job name in the job_code column. Other way is to use next query:
SELECT * FROM `cron_schedule` ...
2
votes
Accepted
Why do magento2 cronjobs need to be ran every minute?
The magento cron process is an internal queue which performs different actions (jobs) at different intervals. To keep these in time in needs to trigger once a minute to maintain the schedule.
Think ...
2
votes
Accepted
Schedule cron job every day
<crontab>
<jobs>
<ebayautopurchase_deleteproducts>
<schedule><cron_expr> 0 */12 * * *</cron_expr></schedule>
<run>&...
2
votes
Accepted
Magento2: How to check if cron job is working or not?
first, check if the cron job is installed or not if not then run these commands in your project root dir
sudo php bin/magento cron:install
then run this command to create cron jobs
sudo php bin/...
2
votes
Magento2: How to check if cron job is working or not?
You can run cron job with below command.
php bin/magento cron:run
Also, run the command from the root,
crontab -l
List all cron if you have cron otherwise display default cron.
REF: https://...
1
vote
best way to run shell commands like "bin/magento c:f" by using cron job magento2
Hi you can below code logic to run commands
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\Process\PhpExecutableFinderFactory;
use Symfony\Component\Process\...
1
vote
Accepted
How To Set up Custom Cron Job in Magento 2?
First you need to create your cron in Cron directory
app/code/Vendor/Module/Cron/Mycron.php
<?php
namespace Vendor\Module\Cron;
class Mycron
{
protected $logger;
...
1
vote
Accepted
How Magento 2 cron jobs work?
Yes, you're right. The system doesn't know about all of the cron jobs defined inside Magento modules. They get exposed/scheduled/executed by a single system level crontab entry that runs the cron:run ...
1
vote
Prevent hanging cronjobs together with stack protection with flock
An idea would be to install a tool like Supervisor and use it to keep a custom script always up and running. In this custom script (maybe bash?) you could check the running time that a process ...
1
vote
Accepted
how to setup cronjob in magento 1.9.3
In your modules config.xml put the following:
<config>
<global>
<models>
<dolphininvoicecron>
<class>Dolphin_Invoice_Model</...
1
vote
Accepted
How to import products using csv file
Magmi
Using magmi tool you can easily import update products.
http://wiki.magmi.org/index.php/Magmi_Wiki
1.Copy magmi to your root directory and unzip it as (https://sourceforge.net/projects/magmi/)
...
1
vote
Accepted
How to run cron job at a particular time in Magento 2?
Add This Files to your Custom Module and first check your module is enable or not. Your Module must be enable.
Create a class to run cron
app/code/VendoreName/ModuleName/Cron
Test.php
<?php
...
1
vote
Accepted
Magento 2 : How to run 2 cron jobs at the same time?
That should work.
Although have you tried a different group?
<config>
<group id="default">
<job name="<job_1_name>" instance="<classpath>" method="<...
1
vote
Magento 2 cron error 'Process went away'
As @Oscprofessionals mentioned already in his comment: This is an issue with your PHP memory_limit.
Check your PHP memory_limit:
$ php -i | grep memory_limit
You can try to run the cronjob manually ...
1
vote
Magento2: existing quote doesn't load through a cron job
Instead using Quote factory, use quote RepositoryrepMagento\Quote\Api\CartRepositoryInterface::getForCustomer
This method needs two param $customerId, array $sharedStoreIds = []
So you have to ...
1
vote
Accepted
Magento2: existing quote doesn't load through a cron job
You can give a try with below code in your cron file for getting quote items with customer id.
protected $quoteFactory;
public function __construct(
\Magento\Quote\Model\QuoteFactory $...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
cronjobs × 71magento2 × 48
cron × 24
magento-cron × 24
crontab × 19
magento2.3 × 11
magento-1.9 × 4
order-email × 4
indexer × 4
reindex × 3
import × 2
magento2.4 × 2
category-products × 2
order-status × 2
script × 2
product × 1
php × 1
checkout × 1
magento2.2 × 1
orders × 1
error × 1
custom × 1
cache × 1
addtocart × 1
image × 1