Created
January 12, 2018 08:12
-
-
Save kubawolanin/0f3fe20e9cb108cc07126ab7f8a1951f to your computer and use it in GitHub Desktop.
Random HABPanel display each 10 seconds
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Random | |
val dashboardList = newArrayList( | |
"Innovation Lab", | |
"Octoprint", | |
"Etc" | |
) | |
val Random random = new Random() | |
rule "Set random dashboard" | |
when | |
Time cron "/10 * * * * ?" | |
then | |
val dashboardName = dashboardList.get(random.nextInt(dashboardList.length)) | |
postUpdate(HABPanel, dashboardName) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment