Here is the following procedure to setup cron in Magento2 :
app/code/Vender/ModuleName/etc/cron_groups.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/cron_groups.xsd">
<group id="cron_group_name">
<schedule_generate_every>1</schedule_generate_every>
<schedule_ahead_for>4</schedule_ahead_for>
<schedule_lifetime>2</schedule_lifetime>
<history_cleanup_every>10</history_cleanup_every>
<history_success_lifetime>60</history_success_lifetime>
<history_failure_lifetime>600</history_failure_lifetime>
</group>
</config>
Create crontab.xml :
app/code/Vendor/ModuleName/etc/crontab.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
<group id="cron_group_name">
<job name="cronname_api" instance="Vendor\ModuleName\Cron\Cron" method="execute">
<schedule>* * * * *</schedule>
</job>
.......................
......................
</group>
</config>
Create Cron.php
app/code/Vendor/ModuleName/Cron/Cron.php
<?php
namespace Vendor\ModuleName\Cron;
class Cron
{
public function execute()
{
// Paste your logic for multiple stores
// Given example cron will run every minute execute() function
}
}