Billions of Internet of Things (IoT) devices rely on batteries as the main power source. These batteries are short-lived, bulky and harmful to the environment. Battery-less devices provide a promising alternative for a sustainable IoT, where energy harvested from the environment is stored in small capacitors. This constrained energy storage and the unpredictable energy harvested result in intermittent on–off behavior of the device. Measuring and understanding the current consumption and execution time of different tasks of IoT applications is crucial to properly operate these battery-less devices. In this paper, we study how to properly schedule sensing and transmission tasks on a battery-less LoRaWAN device. We analyze the trade-off between sleeping and allowing the device to turn off between the execution of application tasks. This study allows us to properly define the device configuration (i.e., capacitor size) based on the application tasks (i.e., sensing and sending) and environmental conditions (i.e., harvesting rate). We define an optimization problem that determines the optimal capacitor voltage at which the device should start performing its tasks. Our results show that a device using LoRaWAN Class A can measure the temperature and transmit its data at least once every 5 s if it can harvest at least 10 mA of current and uses a relatively small capacitor of 10 mF or less. At harvesting rates below 3 mA, it is necessary to turn off the device between application cycles and use a larger supercapacitor of at least 140 mF. In this case, the device can transmit a temperature measurement once every 60–100 s.