Have you considered running the python script under systemd with a timer?
Things to overcome:
- on timer tick establish that your user has a graphical session
- export the wayland socket and other bits
- run grim
Have you considered running the python script under systemd with a timer?
Things to overcome: