Crongroup

With this snippet you can create a separate cron group. It will generate just a cron_groups.xml file which is automatically loaded by Magento.

Use the snippet in the Magento 2 module creator.

Files

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="default">
		<schedule_generate_every>15</schedule_generate_every>
		<schedule_ahead_for>20</schedule_ahead_for>
		<schedule_lifetime>15</schedule_lifetime>
		<history_cleanup_every>10</history_cleanup_every>
		<history_success_lifetime>15</history_success_lifetime>
		<history_failure_lifetime>4320</history_failure_lifetime>
		<use_separate_process>1</use_separate_process>
	</group>
</config>