You can have a look at:
iToo
and
KeepAlive
for background (foreground) running of tasks
Not sure what you are talking about with regards to wifi? If there is no wifi, then your phone should then use data (3/4/5 G) instead.