Skip to content

Commit

Permalink
feat: change fan scheduling to cron based
Browse files Browse the repository at this point in the history
  • Loading branch information
bigboxer23 committed Sep 16, 2024
1 parent b0cf955 commit b795c3d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.41.1</version>
<version>2.43.0</version>
<configuration>
<java>
<googleJavaFormat>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public FanSystemController(SwitchBotController switchbotController) {
this.switchbotController = switchbotController;
}

@Scheduled(fixedDelay = 3600000) // every 6 hours
@Scheduled(cron = "0 0 */6 * * *") // every 6 hours
public void runFans() throws IOException, InterruptedException {
logger.info("Turning on fan system");
RetryingCommand.execute(
Expand Down

0 comments on commit b795c3d

Please sign in to comment.