Use ESP8266 offline / when no connection can be made

Hi,
I was wondering how I can use the ESP8266 even when no connection to a wifi network or thinger.io servers can be established. I’d like to modify some variables on the device from the thinger.io website with which I can control the specific behavior of my program. Should no connection be made, I’d like it to use some default parameters that are hard coded (Think of time intervals when some sensor is read, etc.). As it is now, the ESP8266 just stalls in an endless loop trying to connect to a set network, without being able to do any other task. I’d like it to just stop trying to connect after a set amount of failed connection attempts. It then would do its task and go into deepsleep mode. After wakeup, it can try to connect again to update the variables. Is there any way to do this?