You might need to add a power mgmt extension (Iām not very familiar with micro:bit ecosystem), but it looks like you shoud be able to use these notes if your board is a V2 (probably) Power Management V2 ā BBC micro:bit MicroPython 2 documentation or this page for V1
Then just invoke a deepsleep function after writing the sd data and begin a sleep timer that re-runs the whole thing after waking