Magento2: CRON Job is scheduled but Not Running Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?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

Using "nakedly" instead of "with nothing on"

Is there a documented rationale why the House Ways and Means chairman can demand tax info?

Writing Thesis: Copying from published papers

How should I respond to a player wanting to catch a sword between their hands?

What's the point in a preamp?

How are presidential pardons supposed to be used?

Biased dice probability question

Why is there no army of Iron-Mans in the MCU?

If A makes B more likely then B makes A more likely"

How to market an anarchic city as a tourism spot to people living in civilized areas?

Can I throw a sword that doesn't have the Thrown property at someone?

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

Should you tell Jews they are breaking a commandment?

What computer would be fastest for Mathematica Home Edition?

What kind of display is this?

I'm thinking of a number

Active filter with series inductor and resistor - do these exist?

Stars Make Stars

Are my PIs rude or am I just being too sensitive?

Is there a service that would inform me whenever a new direct route is scheduled from a given airport?

Working around an AWS network ACL rule limit

Passing functions in C++

What do you call a plan that's an alternative plan in case your initial plan fails?

3 doors, three guards, one stone



Magento2: CRON Job is scheduled but Not Running



Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?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)










share|improve this question
















bumped to the homepage by Community 2 days 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)










share|improve this question
















bumped to the homepage by Community 2 days 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)










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)







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,6492528




2,6492528










asked Jun 4 '18 at 6:18









JB PakalapatiJB Pakalapati

466217




466217





bumped to the homepage by Community 2 days 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 2 days 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,6742523




2,6742523












  • 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,8901821




2,8901821












  • 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

Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?