Magento2: CRON Job is scheduled but Not Running The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Magento2: How to create a cron Job and make to run dailyMagento2 cron job failsI created a custom module ,but getting error, not able to figure out what the error is about. How to get out of this error?Cron job not runningCustom module cron job not runningMagento 2: How to override newsletter Subscriber modelIntegration test cron job is not runningMagento2 Cron job not runningCron job is not running automaticallyHow to solve Front controller reached 100 router match iterations in magento2Getting Errors after MySQL database import

Do warforged have souls?

Is it ethical to upload a automatically generated paper to a non peer-reviewed site as part of a larger research?

Categorical vs continuous feature selection/engineering

Variable with quotation marks "$()"

What was the last x86 CPU that did not have the x87 floating-point unit built in?

TDS update packages don't remove unneeded items

Is there a way to generate uniformly distributed points on a sphere from a fixed amount of random real numbers per point?

Did the new image of black hole confirm the general theory of relativity?

Is this wall load bearing? Blueprints and photos attached

What's the point in a preamp?

Word for: a synonym with a positive connotation?

What information about me do stores get via my credit card?

Student Loan from years ago pops up and is taking my salary

"... to apply for a visa" or "... and applied for a visa"?

different output for groups and groups USERNAME after adding a username to a group

Make it rain characters

Would an alien lifeform be able to achieve space travel if lacking in vision?

How to read αἱμύλιος or when to aspirate

Keeping a retro style to sci-fi spaceships?

How to create a folder symlink that has a different name?

What happens to a Warlock's expended Spell Slots when they gain a Level?

How to make Illustrator type tool selection automatically adapt with text length

What do I do when my TA workload is more than expected?

Does Parliament hold absolute power in the UK?



Magento2: CRON Job is scheduled but Not Running



The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Magento2: How to create a cron Job and make to run dailyMagento2 cron job failsI created a custom module ,but getting error, not able to figure out what the error is about. How to get out of this error?Cron job not runningCustom module cron job not runningMagento 2: How to override newsletter Subscriber modelIntegration test cron job is not runningMagento2 Cron job not runningCron job is not running automaticallyHow to solve Front controller reached 100 router match iterations in magento2Getting Errors after MySQL database import



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I have created a Cron job followed this question Installed the Extension and check it from admin back it says the job is pending. Below is the screenshot and my code in detail, Please let me know if I am doing wrong anywhere.



enter image description here



All jobs are in a pending state for a very long time.




appcodeAutosynchsynchProductetccorntab.xml




<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
<group id="default">
<job name="custom_AutoSynch_cronjob" instance="AutosynchsynchProductPageService" method="execute">
<schedule>10 * * * *</schedule>
</job>
</group>
</config>


I need to run this below Code.




appcodeAutosynchsynchProductControllerPageService.php




<?php
namespace AutosynchsynchProductControllerPage;
use MagentoFrameworkHTTPClientCurl;

class Service extends MagentoFrameworkAppActionAction
/**
* @param MagentoFrameworkAppActionContext $context
* @param MagentoFrameworkHTTPClientCurl $curl
*/
protected $_curl;

public function __construct(
MagentoFrameworkAppActionContext $context,
Curl $curl
)


parent::__construct($context);
$this->_curl =$curl;

/**
* Send SMS
* @param type $mobile_no
* @param type $body
*/
public function getMyCurlResponse($url)

//$url = urlencode($url);
$this->_curl->get($url);
$response = $this->_curl->getBody();

return $response;


public function myPostCallResponse()
$ch = curl_init();
$url = "http://api.geonames.org/citiesJSON";
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, "north=44.1&south=-9.9&east=-22.4&west=55.2&lang=de&username=jb1234");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($ch);
$resultArray = json_decode($data)->geonames;



//print_r($data);

foreach ($resultArray as $key => $value)
# code...
echo " City : ".$value->toponymName.", n";


die();


public function execute()

//$priceCheck = 'http://alaincopheadofficen-2.fortiddns.com:555/webservices/getupdates.php';

$priceCheck = 'http://alaincopheadofficen-2.fortiddns.com:555/webservices/getupdates.php';


$result = $this->getMyCurlResponse($priceCheck);

$resArray = json_decode($result)->result;

foreach ($resArray as $key => $value)
# code...
//echo " SKU: ",$value->sku,", name: ",$value->name,", Price: ",$value->price, ", Qty: ",$value->qty,". n";

$product_id = $value->sku;
$price = $value->price;
$qty = $value->qty;
echo " nn in check for update Method SKU: ", $product_id,", Price: ", $price, ", Qty: ",$qty;
$this->updateProduct($product_id, $price, $qty);




public function updateProduct($product_id, $price, $qty1) $oldstock != $qty1 ) && $oldstock)

$product->setPrice($price);

// echo ",n new price Updated ",$price;

if ($oldstock != $qty1)
$product->setStockData(array(
'use_config_manage_stock' => 0,
'manage_stock' => 1,
'is_in_stock' => 1,
'qty' => $qty1 ));
//$product->setStockData(['qty' => $qty1, 'is_in_stock' => 1]);
$product->setQuantityAndStockStatus(['qty' => $qty1, 'is_in_stock' => 1]);

// echo " n Updated Stock:";
// print_r($product->getStockData()['qty']);
else
//echo " n oldStock & new stock are equal ".$qty;



$product->save();


else
//echo " n oldprice & new price are equal ".$price;



unset($storeIds, $websiteObj, $_websiteId);
unset($product);














share|improve this question
















bumped to the homepage by Community 14 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • have you configured cron on server?

    – kunj
    Jun 4 '18 at 6:19











  • I don't know this step, Can u Please guide me. @kunj

    – JB Pakalapati
    Jun 4 '18 at 6:20











  • I have added answer.

    – kunj
    Jun 4 '18 at 6:23

















1















I have created a Cron job followed this question Installed the Extension and check it from admin back it says the job is pending. Below is the screenshot and my code in detail, Please let me know if I am doing wrong anywhere.



enter image description here



All jobs are in a pending state for a very long time.




appcodeAutosynchsynchProductetccorntab.xml




<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
<group id="default">
<job name="custom_AutoSynch_cronjob" instance="AutosynchsynchProductPageService" method="execute">
<schedule>10 * * * *</schedule>
</job>
</group>
</config>


I need to run this below Code.




appcodeAutosynchsynchProductControllerPageService.php




<?php
namespace AutosynchsynchProductControllerPage;
use MagentoFrameworkHTTPClientCurl;

class Service extends MagentoFrameworkAppActionAction
/**
* @param MagentoFrameworkAppActionContext $context
* @param MagentoFrameworkHTTPClientCurl $curl
*/
protected $_curl;

public function __construct(
MagentoFrameworkAppActionContext $context,
Curl $curl
)


parent::__construct($context);
$this->_curl =$curl;

/**
* Send SMS
* @param type $mobile_no
* @param type $body
*/
public function getMyCurlResponse($url)

//$url = urlencode($url);
$this->_curl->get($url);
$response = $this->_curl->getBody();

return $response;


public function myPostCallResponse()
$ch = curl_init();
$url = "http://api.geonames.org/citiesJSON";
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, "north=44.1&south=-9.9&east=-22.4&west=55.2&lang=de&username=jb1234");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($ch);
$resultArray = json_decode($data)->geonames;



//print_r($data);

foreach ($resultArray as $key => $value)
# code...
echo " City : ".$value->toponymName.", n";


die();


public function execute()

//$priceCheck = 'http://alaincopheadofficen-2.fortiddns.com:555/webservices/getupdates.php';

$priceCheck = 'http://alaincopheadofficen-2.fortiddns.com:555/webservices/getupdates.php';


$result = $this->getMyCurlResponse($priceCheck);

$resArray = json_decode($result)->result;

foreach ($resArray as $key => $value)
# code...
//echo " SKU: ",$value->sku,", name: ",$value->name,", Price: ",$value->price, ", Qty: ",$value->qty,". n";

$product_id = $value->sku;
$price = $value->price;
$qty = $value->qty;
echo " nn in check for update Method SKU: ", $product_id,", Price: ", $price, ", Qty: ",$qty;
$this->updateProduct($product_id, $price, $qty);




public function updateProduct($product_id, $price, $qty1) $oldstock != $qty1 ) && $oldstock)

$product->setPrice($price);

// echo ",n new price Updated ",$price;

if ($oldstock != $qty1)
$product->setStockData(array(
'use_config_manage_stock' => 0,
'manage_stock' => 1,
'is_in_stock' => 1,
'qty' => $qty1 ));
//$product->setStockData(['qty' => $qty1, 'is_in_stock' => 1]);
$product->setQuantityAndStockStatus(['qty' => $qty1, 'is_in_stock' => 1]);

// echo " n Updated Stock:";
// print_r($product->getStockData()['qty']);
else
//echo " n oldStock & new stock are equal ".$qty;



$product->save();


else
//echo " n oldprice & new price are equal ".$price;



unset($storeIds, $websiteObj, $_websiteId);
unset($product);














share|improve this question
















bumped to the homepage by Community 14 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • have you configured cron on server?

    – kunj
    Jun 4 '18 at 6:19











  • I don't know this step, Can u Please guide me. @kunj

    – JB Pakalapati
    Jun 4 '18 at 6:20











  • I have added answer.

    – kunj
    Jun 4 '18 at 6:23













1












1








1








I have created a Cron job followed this question Installed the Extension and check it from admin back it says the job is pending. Below is the screenshot and my code in detail, Please let me know if I am doing wrong anywhere.



enter image description here



All jobs are in a pending state for a very long time.




appcodeAutosynchsynchProductetccorntab.xml




<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
<group id="default">
<job name="custom_AutoSynch_cronjob" instance="AutosynchsynchProductPageService" method="execute">
<schedule>10 * * * *</schedule>
</job>
</group>
</config>


I need to run this below Code.




appcodeAutosynchsynchProductControllerPageService.php




<?php
namespace AutosynchsynchProductControllerPage;
use MagentoFrameworkHTTPClientCurl;

class Service extends MagentoFrameworkAppActionAction
/**
* @param MagentoFrameworkAppActionContext $context
* @param MagentoFrameworkHTTPClientCurl $curl
*/
protected $_curl;

public function __construct(
MagentoFrameworkAppActionContext $context,
Curl $curl
)


parent::__construct($context);
$this->_curl =$curl;

/**
* Send SMS
* @param type $mobile_no
* @param type $body
*/
public function getMyCurlResponse($url)

//$url = urlencode($url);
$this->_curl->get($url);
$response = $this->_curl->getBody();

return $response;


public function myPostCallResponse()
$ch = curl_init();
$url = "http://api.geonames.org/citiesJSON";
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, "north=44.1&south=-9.9&east=-22.4&west=55.2&lang=de&username=jb1234");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($ch);
$resultArray = json_decode($data)->geonames;



//print_r($data);

foreach ($resultArray as $key => $value)
# code...
echo " City : ".$value->toponymName.", n";


die();


public function execute()

//$priceCheck = 'http://alaincopheadofficen-2.fortiddns.com:555/webservices/getupdates.php';

$priceCheck = 'http://alaincopheadofficen-2.fortiddns.com:555/webservices/getupdates.php';


$result = $this->getMyCurlResponse($priceCheck);

$resArray = json_decode($result)->result;

foreach ($resArray as $key => $value)
# code...
//echo " SKU: ",$value->sku,", name: ",$value->name,", Price: ",$value->price, ", Qty: ",$value->qty,". n";

$product_id = $value->sku;
$price = $value->price;
$qty = $value->qty;
echo " nn in check for update Method SKU: ", $product_id,", Price: ", $price, ", Qty: ",$qty;
$this->updateProduct($product_id, $price, $qty);




public function updateProduct($product_id, $price, $qty1) $oldstock != $qty1 ) && $oldstock)

$product->setPrice($price);

// echo ",n new price Updated ",$price;

if ($oldstock != $qty1)
$product->setStockData(array(
'use_config_manage_stock' => 0,
'manage_stock' => 1,
'is_in_stock' => 1,
'qty' => $qty1 ));
//$product->setStockData(['qty' => $qty1, 'is_in_stock' => 1]);
$product->setQuantityAndStockStatus(['qty' => $qty1, 'is_in_stock' => 1]);

// echo " n Updated Stock:";
// print_r($product->getStockData()['qty']);
else
//echo " n oldStock & new stock are equal ".$qty;



$product->save();


else
//echo " n oldprice & new price are equal ".$price;



unset($storeIds, $websiteObj, $_websiteId);
unset($product);














share|improve this question
















I have created a Cron job followed this question Installed the Extension and check it from admin back it says the job is pending. Below is the screenshot and my code in detail, Please let me know if I am doing wrong anywhere.



enter image description here



All jobs are in a pending state for a very long time.




appcodeAutosynchsynchProductetccorntab.xml




<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
<group id="default">
<job name="custom_AutoSynch_cronjob" instance="AutosynchsynchProductPageService" method="execute">
<schedule>10 * * * *</schedule>
</job>
</group>
</config>


I need to run this below Code.




appcodeAutosynchsynchProductControllerPageService.php




<?php
namespace AutosynchsynchProductControllerPage;
use MagentoFrameworkHTTPClientCurl;

class Service extends MagentoFrameworkAppActionAction
/**
* @param MagentoFrameworkAppActionContext $context
* @param MagentoFrameworkHTTPClientCurl $curl
*/
protected $_curl;

public function __construct(
MagentoFrameworkAppActionContext $context,
Curl $curl
)


parent::__construct($context);
$this->_curl =$curl;

/**
* Send SMS
* @param type $mobile_no
* @param type $body
*/
public function getMyCurlResponse($url)

//$url = urlencode($url);
$this->_curl->get($url);
$response = $this->_curl->getBody();

return $response;


public function myPostCallResponse()
$ch = curl_init();
$url = "http://api.geonames.org/citiesJSON";
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, "north=44.1&south=-9.9&east=-22.4&west=55.2&lang=de&username=jb1234");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($ch);
$resultArray = json_decode($data)->geonames;



//print_r($data);

foreach ($resultArray as $key => $value)
# code...
echo " City : ".$value->toponymName.", n";


die();


public function execute()

//$priceCheck = 'http://alaincopheadofficen-2.fortiddns.com:555/webservices/getupdates.php';

$priceCheck = 'http://alaincopheadofficen-2.fortiddns.com:555/webservices/getupdates.php';


$result = $this->getMyCurlResponse($priceCheck);

$resArray = json_decode($result)->result;

foreach ($resArray as $key => $value)
# code...
//echo " SKU: ",$value->sku,", name: ",$value->name,", Price: ",$value->price, ", Qty: ",$value->qty,". n";

$product_id = $value->sku;
$price = $value->price;
$qty = $value->qty;
echo " nn in check for update Method SKU: ", $product_id,", Price: ", $price, ", Qty: ",$qty;
$this->updateProduct($product_id, $price, $qty);




public function updateProduct($product_id, $price, $qty1) $oldstock != $qty1 ) && $oldstock)

$product->setPrice($price);

// echo ",n new price Updated ",$price;

if ($oldstock != $qty1)
$product->setStockData(array(
'use_config_manage_stock' => 0,
'manage_stock' => 1,
'is_in_stock' => 1,
'qty' => $qty1 ));
//$product->setStockData(['qty' => $qty1, 'is_in_stock' => 1]);
$product->setQuantityAndStockStatus(['qty' => $qty1, 'is_in_stock' => 1]);

// echo " n Updated Stock:";
// print_r($product->getStockData()['qty']);
else
//echo " n oldStock & new stock are equal ".$qty;



$product->save();


else
//echo " n oldprice & new price are equal ".$price;



unset($storeIds, $websiteObj, $_websiteId);
unset($product);











magento2 controllers cron






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 10 at 2:06









magefms

2,6342528




2,6342528










asked Jun 4 '18 at 6:18









JB PakalapatiJB Pakalapati

468217




468217





bumped to the homepage by Community 14 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 14 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.














  • have you configured cron on server?

    – kunj
    Jun 4 '18 at 6:19











  • I don't know this step, Can u Please guide me. @kunj

    – JB Pakalapati
    Jun 4 '18 at 6:20











  • I have added answer.

    – kunj
    Jun 4 '18 at 6:23

















  • have you configured cron on server?

    – kunj
    Jun 4 '18 at 6:19











  • I don't know this step, Can u Please guide me. @kunj

    – JB Pakalapati
    Jun 4 '18 at 6:20











  • I have added answer.

    – kunj
    Jun 4 '18 at 6:23
















have you configured cron on server?

– kunj
Jun 4 '18 at 6:19





have you configured cron on server?

– kunj
Jun 4 '18 at 6:19













I don't know this step, Can u Please guide me. @kunj

– JB Pakalapati
Jun 4 '18 at 6:20





I don't know this step, Can u Please guide me. @kunj

– JB Pakalapati
Jun 4 '18 at 6:20













I have added answer.

– kunj
Jun 4 '18 at 6:23





I have added answer.

– kunj
Jun 4 '18 at 6:23










2 Answers
2






active

oldest

votes


















0














Try this :



You can run CRON by this command: php bin/magento cron:run by terminal or cmd. Even you can configure CRON in server by ssh using crontab -e command. Maybe you will need root user of server you can learn about Magento 2 CRON configuration from here : Magento 2 cron.
You can check CRON successful run or not from cron_schedule database table. You can check CRON status by this command on the server : sudo service cron status.






share|improve this answer























  • I used this command then php bin/magento cron:run I got result as shown in screenshot in question, it creates now corn jobs but these are in pending state for very long time. what should i do now.

    – JB Pakalapati
    Jun 4 '18 at 6:26











  • first time it will create cron schedule second time while you run this command it will run your schedule crons.

    – kunj
    Jun 4 '18 at 6:28











  • Even you get out put like error by php bin/magento cron:run this command

    – kunj
    Jun 4 '18 at 6:28











  • I got this Result when i used that corn:run command : C:xampphtdocsMagento-CE>php bin/magento cron:run Failed loading c:xamppphpextxdebug.dll PHP Warning: PHP Startup: Unable to load dynamic library 'C:xamppphpextphp_interbase.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:xamppphpextphp_interbase.dll' - The specified module could not be found. in Unknown on line 0 Ran jobs by schedule.

    – JB Pakalapati
    Jun 4 '18 at 6:31











  • you have to enable or install php_interbase.dll .

    – kunj
    Jun 4 '18 at 7:52


















0














Create the cron job



To create a cron job for the Magento file system owner, enter the following command as a user with root privileges:



crontab -u <Magento file system owner user name> -e


For example,



crontab -u magento_user -e


A text editor displays. (You might need to choose a text editor first.)



* * * * * <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


where



<path to php binary> is the absolute file system path to your PHP binary
<magento install dir> is the directory in which you installed the Magento software; for example, /var/www



| grep -v "Ran jobs by schedule"


Reference






share|improve this answer























  • I tried this is the result i got : C:xampphtdocsMagento-CE>crontab -u superadmin -e 'crontab' is not recognized as an internal or external command, operable program or batch file.

    – JB Pakalapati
    Jun 4 '18 at 6:29











  • crontab is not for windows OS

    – kunj
    Jun 4 '18 at 6:29












  • So, you have to run cron by command.

    – kunj
    Jun 4 '18 at 6:30











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f228480%2fmagento2-cron-job-is-scheduled-but-not-running%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Try this :



You can run CRON by this command: php bin/magento cron:run by terminal or cmd. Even you can configure CRON in server by ssh using crontab -e command. Maybe you will need root user of server you can learn about Magento 2 CRON configuration from here : Magento 2 cron.
You can check CRON successful run or not from cron_schedule database table. You can check CRON status by this command on the server : sudo service cron status.






share|improve this answer























  • I used this command then php bin/magento cron:run I got result as shown in screenshot in question, it creates now corn jobs but these are in pending state for very long time. what should i do now.

    – JB Pakalapati
    Jun 4 '18 at 6:26











  • first time it will create cron schedule second time while you run this command it will run your schedule crons.

    – kunj
    Jun 4 '18 at 6:28











  • Even you get out put like error by php bin/magento cron:run this command

    – kunj
    Jun 4 '18 at 6:28











  • I got this Result when i used that corn:run command : C:xampphtdocsMagento-CE>php bin/magento cron:run Failed loading c:xamppphpextxdebug.dll PHP Warning: PHP Startup: Unable to load dynamic library 'C:xamppphpextphp_interbase.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:xamppphpextphp_interbase.dll' - The specified module could not be found. in Unknown on line 0 Ran jobs by schedule.

    – JB Pakalapati
    Jun 4 '18 at 6:31











  • you have to enable or install php_interbase.dll .

    – kunj
    Jun 4 '18 at 7:52















0














Try this :



You can run CRON by this command: php bin/magento cron:run by terminal or cmd. Even you can configure CRON in server by ssh using crontab -e command. Maybe you will need root user of server you can learn about Magento 2 CRON configuration from here : Magento 2 cron.
You can check CRON successful run or not from cron_schedule database table. You can check CRON status by this command on the server : sudo service cron status.






share|improve this answer























  • I used this command then php bin/magento cron:run I got result as shown in screenshot in question, it creates now corn jobs but these are in pending state for very long time. what should i do now.

    – JB Pakalapati
    Jun 4 '18 at 6:26











  • first time it will create cron schedule second time while you run this command it will run your schedule crons.

    – kunj
    Jun 4 '18 at 6:28











  • Even you get out put like error by php bin/magento cron:run this command

    – kunj
    Jun 4 '18 at 6:28











  • I got this Result when i used that corn:run command : C:xampphtdocsMagento-CE>php bin/magento cron:run Failed loading c:xamppphpextxdebug.dll PHP Warning: PHP Startup: Unable to load dynamic library 'C:xamppphpextphp_interbase.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:xamppphpextphp_interbase.dll' - The specified module could not be found. in Unknown on line 0 Ran jobs by schedule.

    – JB Pakalapati
    Jun 4 '18 at 6:31











  • you have to enable or install php_interbase.dll .

    – kunj
    Jun 4 '18 at 7:52













0












0








0







Try this :



You can run CRON by this command: php bin/magento cron:run by terminal or cmd. Even you can configure CRON in server by ssh using crontab -e command. Maybe you will need root user of server you can learn about Magento 2 CRON configuration from here : Magento 2 cron.
You can check CRON successful run or not from cron_schedule database table. You can check CRON status by this command on the server : sudo service cron status.






share|improve this answer













Try this :



You can run CRON by this command: php bin/magento cron:run by terminal or cmd. Even you can configure CRON in server by ssh using crontab -e command. Maybe you will need root user of server you can learn about Magento 2 CRON configuration from here : Magento 2 cron.
You can check CRON successful run or not from cron_schedule database table. You can check CRON status by this command on the server : sudo service cron status.







share|improve this answer












share|improve this answer



share|improve this answer










answered Jun 4 '18 at 6:22









kunjkunj

2,6762523




2,6762523












  • I used this command then php bin/magento cron:run I got result as shown in screenshot in question, it creates now corn jobs but these are in pending state for very long time. what should i do now.

    – JB Pakalapati
    Jun 4 '18 at 6:26











  • first time it will create cron schedule second time while you run this command it will run your schedule crons.

    – kunj
    Jun 4 '18 at 6:28











  • Even you get out put like error by php bin/magento cron:run this command

    – kunj
    Jun 4 '18 at 6:28











  • I got this Result when i used that corn:run command : C:xampphtdocsMagento-CE>php bin/magento cron:run Failed loading c:xamppphpextxdebug.dll PHP Warning: PHP Startup: Unable to load dynamic library 'C:xamppphpextphp_interbase.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:xamppphpextphp_interbase.dll' - The specified module could not be found. in Unknown on line 0 Ran jobs by schedule.

    – JB Pakalapati
    Jun 4 '18 at 6:31











  • you have to enable or install php_interbase.dll .

    – kunj
    Jun 4 '18 at 7:52

















  • I used this command then php bin/magento cron:run I got result as shown in screenshot in question, it creates now corn jobs but these are in pending state for very long time. what should i do now.

    – JB Pakalapati
    Jun 4 '18 at 6:26











  • first time it will create cron schedule second time while you run this command it will run your schedule crons.

    – kunj
    Jun 4 '18 at 6:28











  • Even you get out put like error by php bin/magento cron:run this command

    – kunj
    Jun 4 '18 at 6:28











  • I got this Result when i used that corn:run command : C:xampphtdocsMagento-CE>php bin/magento cron:run Failed loading c:xamppphpextxdebug.dll PHP Warning: PHP Startup: Unable to load dynamic library 'C:xamppphpextphp_interbase.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:xamppphpextphp_interbase.dll' - The specified module could not be found. in Unknown on line 0 Ran jobs by schedule.

    – JB Pakalapati
    Jun 4 '18 at 6:31











  • you have to enable or install php_interbase.dll .

    – kunj
    Jun 4 '18 at 7:52
















I used this command then php bin/magento cron:run I got result as shown in screenshot in question, it creates now corn jobs but these are in pending state for very long time. what should i do now.

– JB Pakalapati
Jun 4 '18 at 6:26





I used this command then php bin/magento cron:run I got result as shown in screenshot in question, it creates now corn jobs but these are in pending state for very long time. what should i do now.

– JB Pakalapati
Jun 4 '18 at 6:26













first time it will create cron schedule second time while you run this command it will run your schedule crons.

– kunj
Jun 4 '18 at 6:28





first time it will create cron schedule second time while you run this command it will run your schedule crons.

– kunj
Jun 4 '18 at 6:28













Even you get out put like error by php bin/magento cron:run this command

– kunj
Jun 4 '18 at 6:28





Even you get out put like error by php bin/magento cron:run this command

– kunj
Jun 4 '18 at 6:28













I got this Result when i used that corn:run command : C:xampphtdocsMagento-CE>php bin/magento cron:run Failed loading c:xamppphpextxdebug.dll PHP Warning: PHP Startup: Unable to load dynamic library 'C:xamppphpextphp_interbase.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:xamppphpextphp_interbase.dll' - The specified module could not be found. in Unknown on line 0 Ran jobs by schedule.

– JB Pakalapati
Jun 4 '18 at 6:31





I got this Result when i used that corn:run command : C:xampphtdocsMagento-CE>php bin/magento cron:run Failed loading c:xamppphpextxdebug.dll PHP Warning: PHP Startup: Unable to load dynamic library 'C:xamppphpextphp_interbase.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:xamppphpextphp_interbase.dll' - The specified module could not be found. in Unknown on line 0 Ran jobs by schedule.

– JB Pakalapati
Jun 4 '18 at 6:31













you have to enable or install php_interbase.dll .

– kunj
Jun 4 '18 at 7:52





you have to enable or install php_interbase.dll .

– kunj
Jun 4 '18 at 7:52













0














Create the cron job



To create a cron job for the Magento file system owner, enter the following command as a user with root privileges:



crontab -u <Magento file system owner user name> -e


For example,



crontab -u magento_user -e


A text editor displays. (You might need to choose a text editor first.)



* * * * * <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


where



<path to php binary> is the absolute file system path to your PHP binary
<magento install dir> is the directory in which you installed the Magento software; for example, /var/www



| grep -v "Ran jobs by schedule"


Reference






share|improve this answer























  • I tried this is the result i got : C:xampphtdocsMagento-CE>crontab -u superadmin -e 'crontab' is not recognized as an internal or external command, operable program or batch file.

    – JB Pakalapati
    Jun 4 '18 at 6:29











  • crontab is not for windows OS

    – kunj
    Jun 4 '18 at 6:29












  • So, you have to run cron by command.

    – kunj
    Jun 4 '18 at 6:30















0














Create the cron job



To create a cron job for the Magento file system owner, enter the following command as a user with root privileges:



crontab -u <Magento file system owner user name> -e


For example,



crontab -u magento_user -e


A text editor displays. (You might need to choose a text editor first.)



* * * * * <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


where



<path to php binary> is the absolute file system path to your PHP binary
<magento install dir> is the directory in which you installed the Magento software; for example, /var/www



| grep -v "Ran jobs by schedule"


Reference






share|improve this answer























  • I tried this is the result i got : C:xampphtdocsMagento-CE>crontab -u superadmin -e 'crontab' is not recognized as an internal or external command, operable program or batch file.

    – JB Pakalapati
    Jun 4 '18 at 6:29











  • crontab is not for windows OS

    – kunj
    Jun 4 '18 at 6:29












  • So, you have to run cron by command.

    – kunj
    Jun 4 '18 at 6:30













0












0








0







Create the cron job



To create a cron job for the Magento file system owner, enter the following command as a user with root privileges:



crontab -u <Magento file system owner user name> -e


For example,



crontab -u magento_user -e


A text editor displays. (You might need to choose a text editor first.)



* * * * * <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


where



<path to php binary> is the absolute file system path to your PHP binary
<magento install dir> is the directory in which you installed the Magento software; for example, /var/www



| grep -v "Ran jobs by schedule"


Reference






share|improve this answer













Create the cron job



To create a cron job for the Magento file system owner, enter the following command as a user with root privileges:



crontab -u <Magento file system owner user name> -e


For example,



crontab -u magento_user -e


A text editor displays. (You might need to choose a text editor first.)



* * * * * <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


where



<path to php binary> is the absolute file system path to your PHP binary
<magento install dir> is the directory in which you installed the Magento software; for example, /var/www



| grep -v "Ran jobs by schedule"


Reference







share|improve this answer












share|improve this answer



share|improve this answer










answered Jun 4 '18 at 6:26









Nikunj VadariyaNikunj Vadariya

2,8921821




2,8921821












  • I tried this is the result i got : C:xampphtdocsMagento-CE>crontab -u superadmin -e 'crontab' is not recognized as an internal or external command, operable program or batch file.

    – JB Pakalapati
    Jun 4 '18 at 6:29











  • crontab is not for windows OS

    – kunj
    Jun 4 '18 at 6:29












  • So, you have to run cron by command.

    – kunj
    Jun 4 '18 at 6:30

















  • I tried this is the result i got : C:xampphtdocsMagento-CE>crontab -u superadmin -e 'crontab' is not recognized as an internal or external command, operable program or batch file.

    – JB Pakalapati
    Jun 4 '18 at 6:29











  • crontab is not for windows OS

    – kunj
    Jun 4 '18 at 6:29












  • So, you have to run cron by command.

    – kunj
    Jun 4 '18 at 6:30
















I tried this is the result i got : C:xampphtdocsMagento-CE>crontab -u superadmin -e 'crontab' is not recognized as an internal or external command, operable program or batch file.

– JB Pakalapati
Jun 4 '18 at 6:29





I tried this is the result i got : C:xampphtdocsMagento-CE>crontab -u superadmin -e 'crontab' is not recognized as an internal or external command, operable program or batch file.

– JB Pakalapati
Jun 4 '18 at 6:29













crontab is not for windows OS

– kunj
Jun 4 '18 at 6:29






crontab is not for windows OS

– kunj
Jun 4 '18 at 6:29














So, you have to run cron by command.

– kunj
Jun 4 '18 at 6:30





So, you have to run cron by command.

– kunj
Jun 4 '18 at 6:30

















draft saved

draft discarded
















































Thanks for contributing an answer to Magento Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f228480%2fmagento2-cron-job-is-scheduled-but-not-running%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Best approach to update all entries in a list that is paginated?Best way to add items to a paginated listChoose Your Country: Best Usability approachUpdate list when a user is viewing the list without annoying themWhen would the best day to update your webpage be?What should happen when I add a Row to a paginated, sorted listShould I adopt infinite scrolling or classical pagination?How to show user that page objects automatically updateWhat is the best location to locate the comments section in a list pageBest way to combine filtering and selecting items in a listWhen one of two inputs must be updated to satisfy a consistency criteria, which should you update (if at all)?

Вунгтау (аеропорт) Загальні відомості | Див. також | Посилання | Навігаційне меню10°22′00″ пн. ш. 107°05′00″ сх. д. / 10.36667° пн. ш. 107.08333° сх. д. / 10.36667; 107.0833310°22′00″ пн. ш. 107°05′00″ сх. д. / 10.36667° пн. ш. 107.08333° сх. д. / 10.36667; 107.083337731608Vinh AirportVinh airport facelift improves serviceвиправивши або дописавши їївиправивши або дописавши їїр

Тонконіг бульбистий Зміст Опис | Поширення | Екологія | Господарське значення | Примітки | Див. також | Література | Джерела | Посилання | Навігаційне меню1114601320038-241116202404kew-435458Poa bulbosaЭлектронный каталог сосудистых растений Азиатской России [Електронний каталог судинних рослин Азіатської Росії]Малышев Л. Л. Дикие родичи культурных растений. Poa bulbosa L. - Мятлик луковичный. [Малишев Л. Л. Дикі родичи культурних рослин. Poa bulbosa L. - Тонконіг бульбистий.]Мятлик (POA) Сем. Злаки (Мятликовые) [Тонконіг (POA) Род. Злаки (Тонконогові)]Poa bulbosa Linnaeus, Sp. Pl. 1: 70. 1753. 鳞茎早熟禾 lin jing zao shu he (Description from Flora of China) [Poa bulbosa Linnaeus, Sp. Pl. 1: 70. 1753. 鳞茎早熟禾 lin jing zao shu he (Опис від Флора Китаю)]Poa bulbosa L. – lipnice cibulkatá / lipnica cibulkatáPoa bulbosa в базі даних Poa bulbosa на сайті Poa bulbosa в базі даних «Global Biodiversity Information Facility» (GBIF)Poa bulbosa в базі даних «Euro + Med PlantBase» — інформаційному ресурсі для Євро-середземноморського розмаїття рослинPoa bulbosa L. на сайті «Плантариум»