How can I run OPTIMIZE on a table if I am streaming to it 24/7?

User16826992666
Databricks Employee
Databricks Employee

I have a table that I need to be continuously streaming into. I know it's best practice to run Optimize on my tables periodically. But if I never stop writing to the table, how and when can I run OPTIMIZE against it?