Allah first learns of an event when it happens.

The Secret of Divine Decree, Allah’s Knowledge, and the Tablet and Pen