‘Insomnia’ Keeps Your iPhone Awake, Allows Wi-Fi To Stay OnMonsta'd on March 28th, 2011
Insomnia is an iPhone tweak available for free in Cydia, that prevents your iPhone from really going to sleep. This allows background applications to continue to run and WiFi to work long after the screen has been switched off. This obviously won't help your battery much, but is useful if you are running a logging application that you want to keep working while your phone is locked and the display is off - ie. you are using an IM or IRC client that you wish to stay connected to receive messages while the screen is off.
Insomnia runs as a background process (interestingly it looks like it bypasses Mobile Substrate), and can be enabled/disabled in the included settings app. There is also a pro version of this tweak available (Insomnia Pro) for $1.99 in the Cydia Store that gives you the ability to schedule a time for Insomnia to activate.