Wireless sensor networks typically consist of highly resourceconstrained motes. Hence, it is desirable to reduce the tasks of each mote to a minimum. We claim that even critical security functions such as intrusion detection can be performed by means of randomizing the detection frequency with the goal of making it more lightweight. To this end, we present Patrol, a system which distributes the load caused by various tasks across the network. Patrol makes use of tokens that are exchanged between nodes and activate a certain functionality, such as intrusion detection, temporarily. As a proof-of-concept, we design and implement within Patrol a lightweight intrusion detection algorithm based on the energy consumption of the nodes. We show that by analyzing the energy consumption, flooding attacks can be detected reliably. To illustrate these facts, we use a real-world testbed consisting of the widely-employed TelosB motes.