Questions tagged [crontab]

Short for "cron table". Can refer to the system crontab or Magento's own cronjob management

Filter by
Sorted by
Tagged with
15 votes
3 answers
7k views

How to create custom Module Development in magento 2 from Scratch?

How to create Custom Module Development from scratch in magento 2 with following point. 1.How to Create Module 2.How to Install and Upgrade Database 3.How to Create Module,view and Controller ...
Pramod Kharade's user avatar
9 votes
5 answers
23k views

Magento 2 cron not working

*/1 * * * * www-data php /var/www/magento-2/bin/magento cron:run */1 * * * * www-data php /var/www/magento-2/update/cron.php */1 * * * * www-data php /var/www/magento-2/bin/magento setup:cron:run ...
Prince Yadav's user avatar
7 votes
7 answers
29k views

How to make sure your Magento 2.0 cron job is running

How do I make sure my Magento cron job is running? I setup cron per the Magento 2 installation instructions for the log files. See screen shot (click to enlarge): I am running Magento CE 2.0.2 ...
H. Ferrence's user avatar
  • 1,011
7 votes
2 answers
5k views

Magento 2: How to set cron for reindex in SSH in magento 2?

I want to know how to set cron for reindexing a particular indexer method in Magento 2. I have used below code to reindex all but not working: * * * * * php –f /shell/indexer.php reindexall Can ...
Arshad Hussain's user avatar
7 votes
2 answers
5k views

How to set cronjob dynamic schedule from database in Magento 2

I am working on a custom module for Magento 2. I did setup crontab there and it is working good with static schedule. <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
Sohan's user avatar
  • 297
7 votes
1 answer
1k views

Magento2 :: Why cron:run, update/cron.php, setup:cron:run needed

In Magento Devdocs for setting up cron it is recommended to schedule 3 seperate scripts * * * * * <path to php binary> <magento install dir>/bin/magento cron:run | grep -v "Ran jobs by ...
Atish Goswami's user avatar
6 votes
3 answers
3k views

How to override crontab.xml?

I need to override a crontab.xml from: vendor/magento/module-integration/etc/crontab.xml <job name="expired_tokens_cleanup" instance="Magento\Integration\Cron\CleanExpiredTokens" method="...
Miguel Angel Espinosa García's user avatar
5 votes
1 answer
14k views

Magento 2 Could not acquire lock for cron group: default

We just migrated our Magento 1 site to Magento 2. At some during the process, the default cron group stopped running. This was after data migration and possibly right after the first test orders were ...
nlaitchison's user avatar
5 votes
2 answers
7k views

What is the best method to clear logs?

I run with a dedicated Debian server and I wish like to know what is the best method to clear my logs in my database? Currently, I use the Magento cron every 5 minutes. It's work fine and when I ...
phpschool's user avatar
  • 387
5 votes
4 answers
4k views

Magento 2 set store_id and website_id in crontab

I have written cron to crate customer, but while running code through cron, I am getting error as A customer website ID must be specified when using the website scope code to get website id: $...
Abhimanyu Singh's user avatar
5 votes
3 answers
4k views

Magento2 : Cron run not working

Below given is crontab.xml <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd"> <group id="...
Unknown's user avatar
  • 571
5 votes
3 answers
1k views

Magento Cron is not run on windows

I want to run the cron job on magento, but the cron events are not appeared. This is my etc/config.xml file. <crontab> <jobs> <imagerecycle_imagerecycle> &...
wuang li's user avatar
4 votes
3 answers
10k views

Magento 2: how to use a configuration field for the crontab expression?

In Magento 1, instead of declaring the cron expression directly like this: <crontab> <jobs> <vendor_module_cron> <schedule>*/30 * * * *</schedule&...
Raphael at Digital Pianism's user avatar
4 votes
2 answers
4k views

Magento 2: CronJob bug? MySQL is always running at 30% usage and many php processes are running

I am running magento 2 (2.2.1) on nginx and enable the cronjob by default. php bin/magento cron:install I don't customize any configuration regarding schedule of cronjobs. after running the ...
Micha's user avatar
  • 43
4 votes
1 answer
19k views

Magento2 how to check if cronjobs are correctly set?

I'm pretty sure my cronjobs doesn't work properly. All catalog rules that I created are resetting every day. I checked the cron_schedule table in my db and its empty. Is there a way to test or check ...
cap340's user avatar
  • 691
4 votes
1 answer
4k views

Magento 2: Cron job not logging value of Product in log file [SOLVED]

I'm creating new Cron Job. app\code\Custom\Module\Cron\MyTask.php namespace Custom\Module\Cron; class MyTask { protected $_logger; public function __construct(\Psr\Log\LoggerInterface $...
Jackson's user avatar
  • 9,749
4 votes
1 answer
3k views

"No callbacks found" error message in magento 2 cron job

I have created a crontab in my custom module and scheduled at every 10 minutes. It is working fine, when I am running the "php bin/magento setup:upgrade" command. So, first time it is working fine, ...
Ronak Parmar's user avatar
4 votes
2 answers
6k views

how to configure Consumer_run for async.operations.all?

I have enabled my custom modules for certain functionality, successfully deployed but magento2 admin portal prompts me "something went wrong" when I click my newly installed module.(the module is not ...
Ed Tan's user avatar
  • 173
4 votes
1 answer
64 views

Magento 1.9 cron running, but stops on one method

I have a small bug and have no clue where or how to debug. I have one cron task which runs on production but stops or stuck always on one method. On local env it works like a charm, but on prod not. ...
Oleg's user avatar
  • 239
4 votes
3 answers
392 views

Magento 1.9 Cron.php Works, Cron.sh Does Not

I've tried many solutions, but can not seem to get cron restored. It was working fine and suddenly it no longer does. I have Truncated the cron_schedule table, but it doesn't populate. If I run cron....
vigeos.net's user avatar
4 votes
1 answer
3k views

Magento cron jobs are not scheduling in the cron_schedule table

I have cron task in my custom module for sync data. Below is the code in my module config.xml <config> ------- <crontab> <jobs> <tal_intermediate_cron_product&...
KNKM's user avatar
  • 101
4 votes
0 answers
772 views

Cron generating a lot of process causing the server to hang (Magento 2.0.2)

I have a VM running ubuntu with no problem: Tasks: 124 total, 1 running, 123 sleeping, 0 stopped, 0 zombie %Cpu0 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st ...
Luiz Junior's user avatar
3 votes
3 answers
7k views

How to enable or disable crons in Magento 2?

I checked in cron_schedule table, cron are disabled. I want to enable or disable crons. How can I do that?
Prashant Patil's user avatar
3 votes
1 answer
2k views

Add cron.sh on crontab but cron is not working

I added this line to crontab on our server */5 * * * * /home/users/mydomain/www/cron.sh >> /home/users/mydomain/www/var/log/cron.log 2>&1 but Aoe_Scheduler said last cron success was ...
Yohan's user avatar
  • 1,590
3 votes
1 answer
157 views

Error in Cron with Directoy list - Magento 2.2.7

I moved Magento 2.2.7 from one host to another. I moved it myself. Everything worked except the cron. I installed cron using magento cron command. Now every 15 min. cron is running and sending me a ...
Niraj Nagar's user avatar
3 votes
0 answers
594 views

Magento 2.2:Fails Readiness Check due to Cron - Found non-writable path(s):

Magento 2.2 Error from Updater Application Cron Script: Found non-writable path(s): /home/jon/as/.htaccess /home/jon/as/.htaccess.sample /home/jon/as/.php_cs.dist /home/jon/as/.travis.yml ...
Firoz007's user avatar
2 votes
2 answers
8k views

How to run a specific cron job in Magento2

How can I run a specific cron job code in Magento2 instead of running it by group.
Atish Goswami's user avatar
2 votes
5 answers
4k views

Magento Cron Job is not working using module

I am new to Magento and trying to run Cron Job using module. Here is my code app/etc/modules/FQLabs_Automail.xml <?xml version="1.0"?> <config> <modules> <...
AkshayT's user avatar
  • 123
2 votes
2 answers
169 views

Issue with Index Management

I am running bin/magento indexer:reindex command for indexing. In admin panel Systems->Index Management Updated column shows the updated indexing date for all except ' Product Categories ' and '...
Nafsss's user avatar
  • 720
2 votes
2 answers
679 views

Magento2: I am getting placeholder images in cron tab. Need to get correct images in cron

I am getting placeholder images in crontab. Like this: /pub/static/version1554967977/crontab/_view/en_US/Magento_Catalog/images/product/placeholder/.jpg; This is wrong image. How to get product ...
Shomita's user avatar
  • 1,083
2 votes
1 answer
1k views

How i Can Schedule A cron Job on the Basis of Admin Configurations Values

I created a cron job as per standard method Vendor\Module\etc\crontab.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation=...
Waqar Ali's user avatar
  • 2,189
2 votes
1 answer
337 views

M2 | Why we need to execute cron:run twice executing first time?

I created a custom cron job and tested on local server, where it needs to run bin/magento cron:run two times simultaneously and then that custom job is created and scheduled. why is it like that ...
Ajwad Syed's user avatar
  • 1,581
2 votes
1 answer
444 views

can virtual types be used as cronjob instances

I tried to use a virtual type in cronjob as instance but without any success. When I use a real class it works as expected. Is there any hint to get virtual types working in cronjobs? crontab.xml: &...
Enrico Thies's user avatar
2 votes
1 answer
6k views

Cron job error SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock

Suddenly and without reason, I get error via the mail concerns a cron job that could not be executed. Here is the report : *[Magento\Framework\DB\Adapter\DeadlockException] ...
Greay's user avatar
  • 125
2 votes
1 answer
2k views

Is too much cron jobs schedule cause server time out of website ?

Hi i have a website in magento2 , in my database we have 467500 rows in cron_schedule table , my site is lacking alot and most of the time it goes down displaying server timeout issue . The ...
Hamza Mustafa's user avatar
2 votes
1 answer
758 views

Cron job on specific time not working

I've written a custom module and this module has to run every day at 12:30 AM. I've written a cron job and in the schedule I've update as follows: <config xmlns:xsi="http://www.w3.org/2001/...
Vaish's user avatar
  • 189
2 votes
1 answer
3k views

Magento 2 Cronjob plesk [closed]

I've tried to add the cronjobs for Magento 2 with the Plesk panel. But it doesn't work. Have anyone experience or a solution? PS.: Magento 1 was a little easier, only run the cron.php and it works. ...
user3778868's user avatar
2 votes
1 answer
9k views

Auto-generated sitemap.xml on 1.9.2

I have a problem with the auto-generation of my sitemap. I did everything I have written below. I created a sitemap through Admin > Catalog > Google Sitemap option I made the auto-generation setup ...
J.Corby's user avatar
  • 45
2 votes
1 answer
762 views

Cron job doesn't work

I have a couple cron jobs in my module The problem is that the Magento cron doesn't run one of them, but runs the another one. I have already installed AoeScheduler and that allows to me to run these ...
David Alvir's user avatar
2 votes
1 answer
7k views

Magento 2 Cron jobs are stuck in Pending

I currently have a problem with the cron in my Magento 2 (2.2.7 installation). Orders are coming through but any which come through from an extension called "Adyen" are getting stuck in the "Payment ...
CJNotts's user avatar
  • 392
2 votes
1 answer
441 views

Indexer status (7414 in backlog)

When I run indexer:status from the command line to look at the status of my indexes I notice some are like this: | Catalog Product Rule | Ready | Schedule | working (7414 in backlog) | 2019-02-19 01:...
Head's user avatar
  • 125
2 votes
1 answer
976 views

Magento2: Order updated_at stored in DB in timezone CEST but delivered/transformed to UTC by $order->getUpdatedAt in Environment "crontab"

we are facing a strange behavior for value of updated_at saved in db table sales_order. Server timezone is CEST, updated_at date therefor is saved in CEST to database. This is validated. Default ...
sbothner_y1's user avatar
2 votes
1 answer
938 views

Cron stops running and I have to restart using SSH

Magento ver. 1.9.3.8 In my Cpanel I have 2 cron jobs set to run */5 * * * *. /usr/local/bin/ea-php56 /home/myusername/public_html/cron.php -mdefault >/home/myusername/public_html/var/log/...
Rudy C.'s user avatar
  • 171
2 votes
1 answer
634 views

Session is not working in cron file

namespace send\sms\Cron; use Magento\Framework\ObjectManagerInterface; class Run /*extends send\sms\Controller\Customr*/ { public function execute() { $om = \Magento\Framework\App\...
Ramesh KR's user avatar
  • 826
2 votes
1 answer
95 views

Deleted cron lock files makes the magento unresponsive

We truncated the table core_url_rewrite and deleted the files in var/locks/*. What happened next is our server keeps using high CPU usage. See the high CPU usage below: I restarted apache and it ...
Ner's user avatar
  • 1,061
2 votes
2 answers
536 views

Error on running Cron Command

I have connected my store with SSH terminal and then I navigated to the root directory of my store where I run the following command */5 * * * * cron.sh But its showing this error: bash: */5: No ...
Syed Muneeb Ul Hasan's user avatar
2 votes
1 answer
1k views

Magento 1.9.2.1 Cron not working for Order confirmation emails

I am experiencing very weird issues since this morning (up until then everything seemed to work fine). I made no changes to any code or settings. All transactional emails are being sent (newsletter ...
Dmitrii Kustov's user avatar
2 votes
1 answer
287 views

"Update.log" size increase all the time

Every body, I got a problem -- My var/log.update.log is keeping increasing. And that cause me lot of trouble. I found this issue and try to stop log by change cron job into: * * * * * /usr/local/php/...
楊翔宇's user avatar
  • 101
2 votes
3 answers
3k views

How to create a cron job programatically?

How can I create a cron job in Magento without defining <run><model></model></run> in the XML? I have a lot of jobs that need to be changed programmatically and we couldn't ...
user1240207's user avatar
  • 1,339
2 votes
0 answers
185 views

How to set the CRON for every 4 hours?

I have created a custom cron group and below is the code. <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation=...
MagentoDev's user avatar

1
2 3 4 5