Increase your income with Hive. Invite your friends and earn real cryptocurrency!

Scheduled/Cron Job to Stop Miner

Can someone tell me how to create a schedule or Cron job to run the “miner stop” command daily between 03:00-09:00?

Long story, I am limited to 40 amps total to my house and every morning consistently at a random time between 3am and 9am “something” trips the main switch unless I am running 25 GPUs or less. Then I gotta go out, flick the RCD, make sure all GPUs are running etc. So a script/schedule would be nice?

crontab -e

0 3 * * * miner stop
0 9 * * * miner restart

I tried that and it didnt work (my local time):

sudo crontab -e
20 19 * * * miner stop

I have also tried
20 19 * * * “miner\ stop”

Am I supposed to run a command to update the Cron Jobs or something?

EDIT: Yes I have checked local system time and it correlates to my local time also.

[email protected]:~# date “+%H:%M:%S %d/%m/%y”
19:24:24 27/05/18

1 Like

Try with the complete path maybe?

Awesome - that did the trick…

  • 3 * * * /hive/bin/miner stop
  • 9 * * * /hive/bin/miner start

However i noticed that it disappears after a while, so I read in another link that it should be referencing this:


So I made the same changes and hope it stays permanent now.

Thanks again anopak and Bagster.

1 Like
  • 3 * * * /hive/bin/miner stop

it will run the script every minute of the hour 9

you should have

0 3 * * * /hive/bin/miner stop

1 Like

Thanks anopak - just realised my mistake and thanks for pulling me up on that.

Just realised, this doesnt really work when you have Watchdog enabled - it will just restart the miner after your set time. So you will have to disable WD for this to work properly.

Also note if you upgrade - you have to set them again!

Can anyone help a dummy like me to create a schedule to be able to run the miner in the morning & stop in the evening?

For the life of me can’t get this to work. Tried editing crontab.root using vi and nano adding to the end of the file(just for testing stop on first minute of the hour and restart on the fourth):

#stop miner
1 * * * * /hive/bin/miner stop

#start miner
4 * * * * /hive/bin/miner start

Left empty line under start miner command. Saved and exit but it will not run. What am I missing?

Also tried editing using:
[email protected]:/hive/etc# crontab.root -e
bash: ./crontab.root: Permission denied

Please help this poor noob!

Update… 16/03/19

Got this to work today. Edited crontab.root with nano. Added commands as mentioned above. Made sure no extra spaces anywhere. Seems to be working!

Happy mining!