# Scheduled polling in a device handler

**URL:** <https://community.smartthings.com/t/scheduled-polling-in-a-device-handler/95772>\
**Category:** Writing Device Types\
**Created:** [August 15, 2017, 9:28pm UTC](https://community.smartthings.com/t/scheduled-polling-in-a-device-handler/95772 "2017-08-15T21:28:11Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![bangali](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/bangali/32/83401_2.png) [@bangali](https://community.smartthings.com/u/bangali)\
**Post date:** [August 18, 2017, 1:04am UTC](https://community.smartthings.com/t/scheduled-polling-in-a-device-handler/95772/21 "2017-08-18T01:04:15Z")

</div>

thank you, will give that a shot.

---

<div class="post-metadata">

**Author:** ![ventz](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/ventz/32/75308_2.png) [@ventz](https://community.smartthings.com/u/ventz)\
**Post date:** [February 10, 2018, 2:27am UTC](https://community.smartthings.com/t/scheduled-polling-in-a-device-handler/95772/22 "2018-02-10T02:27:19Z")

</div>

Thanks for providing this.

I have something very similar too:

```auto
def poll() {
	log.debug "Executing 'poll'"
	checkStatus()	
}

def installed() {
	log.debug "Executing 'installed'"
	updated();
}

def updated() {
	log.debug "Executing 'updated'"
    unschedule()
    runEvery15Minutes(refresh)
    runIn(2, refresh)
}

def refresh() {
	log.debug "Executing 'refresh'"
	checkStatus()

}

```

The key part seems to be to remove+re-add your virtual devices in order to trigger the schedule, after you publish the device.

And as mentioned, past that, you don’t need a smart app or any other pollers. It just works!

[Previous page](https://community.smartthings.com/t/scheduled-polling-in-a-device-handler/95772.md?page=1)
