... I wrote a script called Shepherd, which is basically a glorified scheduler (cron) that has not just time, but a power and connectivity axis, too. ...
Hm, Shepherd can't make an app (not) use wifi, however, it can start or stop it depending whether wifi is (not) available. Would that help ?