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
14
votes
2answers
4k 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 ...
7
votes
7answers
26k 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 ...
7
votes
5answers
12k 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 ...
7
votes
2answers
4k 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 ...
7
votes
2answers
3k 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:...
6
votes
1answer
906 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 ...
5
votes
3answers
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> &...
4
votes
2answers
5k 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 ...
4
votes
1answer
36 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. ...
4
votes
2answers
163 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....
4
votes
3answers
1k 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="...
4
votes
1answer
2k 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&...
3
votes
2answers
4k 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&...
3
votes
2answers
3k 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 ...
3
votes
3answers
784 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?
3
votes
1answer
1k 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 $...
3
votes
1answer
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 ...
3
votes
1answer
78 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 ...
3
votes
4answers
1k 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: $...
3
votes
2answers
1k 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="...
3
votes
0answers
150 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 ...
3
votes
0answers
619 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 ...
2
votes
5answers
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> <...
2
votes
2answers
77 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 '...
2
votes
1answer
41 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 ...
2
votes
2answers
178 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 ...
2
votes
1answer
34 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=...
2
votes
1answer
658 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 ...
2
votes
1answer
321 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/...
2
votes
1answer
7k 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 ...
2
votes
1answer
703 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 ...
2
votes
1answer
127 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: &...
2
votes
1answer
534 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/...
2
votes
1answer
278 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\...
2
votes
1answer
56 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 ...
2
votes
2answers
387 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 ...
2
votes
1answer
617 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 ...
2
votes
1answer
2k 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. ...
2
votes
3answers
2k 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 ...
2
votes
2answers
1k 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 ...
2
votes
1answer
256 views

Magento 2: How can I fix my cron issue?

I've installed Magento 2.3 on my server. Currently I am trying to activate cron, but unfortunately I always get the same notice when I try to install and run it. Error during saving of crontab: sh: ...
2
votes
1answer
505 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, ...
2
votes
1answer
283 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 ...
2
votes
0answers
30 views

Magento 1.9, Order email found in core_email_queue, but not sent out

I have Magento 1.9 website, and the order emails have always been working. But about just a few days a ago I noticed that the order confirmation emails are not sent out to customers. I have set ...
2
votes
0answers
299 views

Magento 2 Cron job not running with constructor

I am currently developing a drop shipping module for our Magento 2.2.3 store. For this I am creating a cron job to send a post request to my API that pulls in all the orders where a Magento 2 order ...
2
votes
0answers
122 views

Installed cron scheduler but I see now that cron is having issues

I'm looking at the timeline & I see that cron keeps stopping & the cron jobs are not running. I get this message "Last heartbeat is older than one hour. Please check your settings and your ...
2
votes
0answers
268 views

How to set cron schedule dynamically from database?

I have a module which is basically a grid and has entry for different jobs. Each entry here represent a cron and all these crons are mentioned in crontab.xml. Now I need to use the schedule from a Job ...
2
votes
0answers
65 views

How to run crontab for Magento upgrade

I am having a problem with crontab I installed Magento on DigitalOcean using one-click approach and it's working fine but I want to upgrade Magento to the last version 2.1.5 and Check Readiness gives ...
2
votes
0answers
452 views

Magento2 Cronjob and Generate Schedules Every

I create a custom module, that updates prices and product stock. This is two different jobs in the same cron group. My crontab.xml is: <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"...
2
votes
1answer
184 views

update product inventory and and price by attribute

I need to write a cron job to update my products inventory and price hourly. The variables are these. I have 6000 products with their own IDs which my accounting system uses (not magento). These ...