You already know how to create a simple CLI script. The CLI scripts are initialized with a different area – essentially, with a separate CLI area\application, which lacks the standard frontend\admin localizations functionality. We faced that when developing a script for sending order emails via CLI – the emails were missing translations of the origin of the order. Let’s try to figure out “why?” and “how to fix?”.
Magento 2 Command-line interface (CLI) tools differ from those in Magento 1. In Magento 1 you could simply add a script to the “shell” directory, include abstract.php, and extend from it. Magento 2 is a bit more complicated. This post will show you how to create a simple CLI script in Magento 2.
Recent security patches have covered many security leaks. Some of the changes were added via .htaccess files either in Magento root or in specific directories (e.g. shell directory). These fixes will be applied automatically, if your Magento 1.x installation is running on Apache 2, but it won’t work if you prefer Nginx. In this post we will show you the proper Nginx config which provides the same result with a few additions.
In the part 2 we have described the powerfulness of terminal multiplexers and reviewed one of the most popular terminal utilities – Tmux. Such kind of multiplexers might greatly boost your performance in handling different CLI operations. Let’s go forward and imagine the trivial situation, when you have created your own handy CLI environment with many terminal windows in one tab or so. You have everything under your hand but sooner or later you have to reboot your computer because of a new system update or installing some applications that require the system restart. In this case, your terminal multiplexer process will be shut down and you will lose all your settings. Fortunately, there are few lovely utilities that help save all your windows/tabs configurations and allow to recreate the entire tabs with windows.
In the previous article we wrote about few improvements that you can implement for your Command Line Interface (CLI). But “Perfection knows no limits” and in this article we would like to dig deeper and describe few additional solutions that will make your CLI more powerful in your hands.
Many developers/system administrators sooner or later face with the situation when one terminal window or even few terminal tabs is not the most convenient solution. You want to have everything close at hand: to see all terminal windows at the same time. Sure, you can tile all terminal windows or improvise in some other way but for making the things easier let’s give a shot for a terminal multiplexer.
Most of modern softwares have a handy graphical user interface that allows executing different operations by few actions. We are talking not only about user interfaces for social networks, messengers, email clients etc. You can even create an entire website or a standalone application by few clicks and labels using different automated software with a good UI toolkit. That’s really great because it involves more and more people into attempts to create something new and special. However, what about people who stand behind this scene – developers, who create “software for creating a software”?
As you know, the possibility to schedule and execute some operations automatically in the background – it is a very important feature almost for all web applications. It allows to configure the system to check for the new updates, to make some maintenance operations, like logs cleaning, to run the synchronization processes between different systems etc. OroCRM has a built-in CRON daemon that gathers all CRON jobs from all the installed extensions and runs them in a scheduled time. The process of adding a new CRON job is quite easy.