Sometimes it is desirable to execute actions in the background and periodic intervals. Building on from last week’s post, I wanted to spotlight a new feature, which uses the asynchronous event queue, to allow you to do this – the periodic execution (cron) service.

After completing the configuration step for enabling the Asynchronous Event Queue, you can then run the Known console periodic execution service:

./known.php service-cron

Once running, this service will periodically trigger an event to which code can listen to. Available events are cron/minute, cron/hourly and cron/daily.

Leave a Reply