Categories


Archives


Recent Posts


Categories


Magento 2 Marketplace: Cron and Hidden Files

astorm

Frustrated by Magento? Then you’ll love Commerce Bug, the must have debugging extension for anyone using Magento. Whether you’re just starting out or you’re a seasoned pro, Commerce Bug will save you and your team hours everyday. Grab a copy and start working with Magento instead of against it.

Updated for Magento 2! No Frills Magento Layout is the only Magento front end book you'll ever need. Get your copy today!

If you’re giving Magento’s new Marketplace feature a spin for the first time, you may be surprised to find that it requires you have your three Magento 2 cron jobs running.

There’s a few reasons for this. The first is a clever solution to the perennial PHP permissions problems when running commands and creating files as a web-user. It turns out the new Magento Marketplace web application never directly runs a unix command line command, or directly installs an extension. It simply schedules actions to take place, and there are various jobs in Magento’s crons that check for these scheduled actions.

The second, semi-related reason is Magento’s cron jobs write a number of hidden files to the var folder

$ ls -ld1 var/.*

//...
var/.setup_cronjob_status
var/.type.json
var/.update_cronjob_status
var/.update_queue.json
var/.update_status.txt    
var/.maintenance.flag    
var/.maintenance.ip

These files serve a variety of purposes. Some collect information about the Magento system, others signal to the Component Manager that it’s time to install a new extension, still other signal to Magento itself that its in maintenance mode, and should direct users to a maintenance page.

If you’re working locally on a development instance, you may not have your cron jobs configured. If you don’t want to configure cron jobs for a local dev instance, you should be able to run them manually whenever the Marketplace UI seems hung up (i.e. there’s a prolong ajax request constantly pinging the server).

Copyright © Alana Storm 1975 – 2023 All Rights Reserved

Originally Posted: 15th April 2016

email hidden; JavaScript is required