<?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="default">
        <!--
            Every five minutes, and refreshIfDue() refreshes on the one run this installation is
            due for — roughly once a day, at its own second of the day. Five and not one: a minutely
            job would write 1440 cron_schedule rows a day to answer "not yet" 1439 times.

            The job name is the key in cron_schedule and in the cron status check, so it stays as it
            is even though the class beside it was renamed.
        -->
        <job name="mst_core_license_check" instance="Mirasvit\Core\Cron\LicenseCheckCron" method="execute">
            <schedule>*/5 * * * *</schedule>
        </job>
        <!--
            A trigger, not the period: the poll happens at most once per
            system/adminnotification/frequency, and NotificationCheckCron enforces that itself. The
            schedule only decides how soon after the interval elapses the next attempt is made.

            Four times an hour and not once, because an hourly trigger against an hourly interval
            is decided by jitter: a run arriving a second early is told "not yet" and the poll slips
            a whole hour. A quarter of an hour is short enough that a missed slot costs little and
            long enough to stay well under what the check above already spends.
        -->
        <job name="mst_core_notification_check" instance="Mirasvit\Core\Cron\NotificationCheckCron" method="execute">
            <schedule>*/15 * * * *</schedule>
        </job>
        <job name="mst_core_message_check" instance="Mirasvit\Core\Cron\MessageCheckCron" method="execute">
            <schedule>*/15 * * * *</schedule>
        </job>
    </group>
</config>
