Heartbeat on GPIO2 for ZBT router

I need to write a script that runs on startup that touches GPIO2 every 1 second but i have no clue how to go about this.
It's to keep the router on and prevent watchdog from shutting it down all the time