How to turn on the clusterhat 30 seconds after boot?

81 views
Skip to first unread message

Ben Heininger

unread,
Sep 28, 2023, 2:07:21 AM9/28/23
to ClusterHAT
Hi everyone,
I have been trying to run clusterhat on using crontab and I am failing miserably.
I had it setup and working before I formatted the sd card and I forgot to back it up.
I tried crontab -e and sudo crontab -e with the following command that I found in several places on the web 
@reboot sleep 30 && /usr/local/bin/clstrhtn.sh
I also tried:
@reboot sleep 30 && clusterhat on (and "clusterhat on")

I have tested clstrhtn.sh and it works but it doesn't work in crontab.

clstrhtn.sh looks like this:
#!/bin/bash
clusterhat on

I also tried putting the sleep 30 inside the bash script but that didn't work either.

How do I do this please?

Chris Burton

unread,
Oct 1, 2023, 10:17:05 AM10/1/23
to ClusterHAT
Hi, 
How do I do this please?

Cron won't have "/usr/sbin/" in it's PATH (so neither would the script you're running from cron).

If you use the full path to clusterctrl it should work OK.

@reboot sleep 30 && /usr/sbin/clusterctrl on

Chris. 

Ben Heininger

unread,
Oct 3, 2023, 12:38:12 AM10/3/23
to ClusterHAT
Brilliant, thank you Chris, that worked perfectly.
Reply all
Reply to author
Forward
0 new messages