Ensure that the system version of Magneto X is equal to or higher than v1.1.3. If not, please refer to this link to upgrade the system:
https://wiki.peopoly.net/en/magneto/magneto-x/update-magneto-x-online
After upgrade the system, please edit printer.cfg, add "[include timelapse.cfg]":
Restart klipper, and you can see the TIMELAPSE menu on the left sidebar of mainsail:
Refer to the settings shown in the figure below and set up timelapse:
The main step is to add TIMELAPSE_TAKE_FRAME in the G-code for layer changes.