How can I execute Cron from command line manually.
In Magento 1.x we can run cron like :
www.testsite.com/cron.php
but in magento 2 how can I do this ?
Please also help me for how can I execute cron from cmd. I already used below command which is not working :
sudo php bin/magento cron:run [--group="customgroupname_cron"]
This is returning exception :
[RuntimeException]
Too many arguments.
cron:run [--group="..."] [--bootstrap="..."]
------- Update -------
crontab.xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
<group id="customgroupname_cron">
<job name="customgroupname_cron" instance="Namespace\Modulename\Cron\Customcronjob" method="execute">
<schedule>* * * * *</schedule>
</job>
</group>
</config>
In execute method of above file I put log. But after 1 minute also that is not generated.So how can I came to know that my method is executed.