OS X Mail: What circumstances are there were Mail rules could be delayed or not invoked
macOS mail app only runs rules when it’s fully powered up (not just power-nap checking mail) and connected to the internet. You would need a server side rule processing provider like Outlook / Exchange / O365 to have rules trigger when your local mail client isn’t running to have a robust mail rule engine to work 24x7.