How to run cron in Magento 2.0

Magento Recommends 3 type of cron are introduced in magento-2 as given below

*/1 * * * * php -c /path/to/magento2/bin/magento cron:run
*/1 * * * * php -c /path/to/magento2/bin/magento/update/cron.php
*/1 * * * * php -c /path/to/magento2/bin/magento setup:cron:run
but we do not need to configure all of them ,

1st cron command will work for reindexes indexers, send automated e-mails, generates the sitemap, and so on.

rest 2 cron commands are used by the Component Manager and System Upgrade.

To congfigiure CRON, edit crontab command line

crontab -u magento_user -e
add this line at the end of file

* * * * * php -c /path/to/magento2/bin/magento cron:run
# this will run every minute
if you do not want every minute you can set every 5 min as given below:

*/5 * * * * php -c /path/to/magento2/bin/magento cron:run

How to use Registry Object in Magento 2.0

Magento 2.0 have a registry object that should help easy the transition for extensions. The class is Magento\Framework\Registry, and you can inject it in any constructo

public function __construct(//…
\Magento\Framework\Registry $registry,
$this->registry = $registry;
and then set variables with

$this->registry->register(‘test_var’, ‘this is a test!’);
and fetch those variables back (even from a differnt object – Magento\Framework\Registry is a shared/singleton object)

echo $this->registry->registry(‘test_var’);

Magento2 Custom SMTP

Custom SMTP for Magento2 : An expansion presenting with best features for the consumers. The easily accessible and user friendly magento extension is on its way to make the work more convenient and affordable for the users. Custom SMTP is one of the most exclusive extensions which will help merchant to control the server settings for sending magento emails using personalized email server. The direct use of customized server enhances the use of this magento extension to be more handy and easy accessible.
This extension gives the entire control of email settings for Magento. Consumer can configure any custom SMTP server mail directly such as Gmail, AWS and many more.
This extension is purely dynamic as it gives convenience of directly sending the magento mails using customized server instead of sending them through server indirectly.

Extension : Magento2 Custom SMTP
GIT : Code Base