You mean something like this? The example sketch could be modified to run any custom code.
@Ryan780 brings up a good point regarding Cree firmware issues. You could disable OTA updates to resolve that issue, maybe.