You need to setup a cron schedule as below:
This is the most convenient method if your hosting provider allows scheduling recurring tasks via crontab on nix or
“Scheduled Tasks” on a Windows server. Please refer to your hosting manual or contact your hosting provider for instructions. The PHP CLI executable is called to run cron.php.
Add the following entry to cron file normally in /etc/crontab in nix systems and adjust: the time; the webuser; and paths accordingly.
*/5 * * * * nobody /path/to/php /path/to/api/cron.php
Source - POP3/IMAP Settings Guide