Start and stop your NiceHash miners using this script.

Overview

NiceHash Mining Scheduler

Use this script to schedule your NiceHash Miner(s).

Electricity costs between 4-9pm are high in my area and I want NiceHash to stop mining during those times. This script should start and stop your rigs on a schedule.

Installation

Acquire the necessary files by downloading the latest release. Save and extract the files to a directory of your choosing.

Configuration

  1. Open the NiceHash API key settings. Take note of your organization id located at the top of the page. (Ex. 01234567-0123-0123-0123-012345678900)

  2. Create an API key. You can make the App Name whatever you want. I recommend changing the API permissions to only allow "Mining permissions" and "Manage Rigs" as this is all that is required for the script to function. Take note of the "API Key Code" (public key) and the "API Secret Key Code" (private key). Make sure you complete the process of activating the new API key.

  3. Install python and and pip and requests for your operating system. These are my suggestions, do as you wish :)

Windows:

  1. Install Visual Studio Code
  2. Go to plugins and install python or follow these instructions (https://www.geeksforgeeks.org/download-and-install-python-3-latest-version/)
  3. Install Pip (https://www.geeksforgeeks.org/how-to-install-pip-on-windows/)
  4. Use pip to install requests (https://docs.python-requests.org/en/master/user/install/)

MAC:

  1. Install Visual Studio Code
  2. Go to plugins and install python
  3. Install Pip (https://www.geeksforgeeks.org/how-to-install-pip-in-macos/)
  4. Use pip to install requests (https://docs.python-requests.org/en/master/user/install/)

Initial Testing

Run the test script before setting up the Windows Task Scheduler or Cron job. Once you have added your API key, secret and organization ID in config.json and installed python and requests, you should be able to run the test script.

Using a shell of your choice (terminal, powershell, command prompt) navigate to the directory where test.py is located and type python test.py (for Windows) or python3 test.py (for mac).

If it worked then you should see a list of your rigs and then 'Finished' at the bottom.

Actual Testing

  1. Make sure everything is setup and the inital testing works
  2. Go to https://www.nicehash.com/my/mining/rigs and determine whether your rigs are mining or stopped
  3. If they are stopped, run python3 start_schedule.py, refresh the rigs page and they should start
  4. If they are mining, run python3 stop_schedule.py, refresh the rigs page and they should stop

Cron (Not finished)

Using Windows Task Scheduler:

Using CronTab:

If you would like to run this script on your own schedule using crontab, you can pass '--cron' as a command line argument. Passing this argument will suppress the automatic 4 hour loop, and the script will only execute once.

You can use Crontab Generator to quickly generate a custom crontab command.

Note: Crontab runs in your home directory by default. If you saved the script to a different directory, you will have to tell cron to change directories before running the script.

Ex:

* */4 * * * cd /home/[USER]/AutoWithdraw && python3 start_schedule.py --cron >/dev/null 2>&1
* */4 * * * cd /home/[USER]/AutoWithdraw && python3 stop_schedule.py --cron >/dev/null 2>&1

Donations

BTC: 3LBcrMcyGSNKJoat8dbPseqtomNBe79Yu5

ETH: 0x7579c17a57aFF6d40472A1e21b13D197Fd0116a7

LRC: 0x33F94f644B36AD13f232154a4C0D79c29a9656DC

MANA: 0x0d68D933582dB964CC5E31Fe305aC59026e0Aab1

MATIC (from Ethereum network): 0x5549d1536c2eacC50e8773c9241581465650f5eF

XRP: rw2ciyaNshpHe7bCHo4bRWq6pqqynnWKQg TAG: 3272534061

You might also like...
A script where you execute a script that generates a base project for your gdextension

GDExtension Project Creator this is a script (currently only for linux) where you execute a script that generates a base project for your gdextension,

An assistant to guess your pip dependencies from your code, without using a requirements file.

Pip Sala Bim is an assistant to guess your pip dependencies from your code, without using a requirements file. Pip Sala Bim will tell you which packag

A python script that changes your desktop background based on current weather and time of the day.

Desktop background wallpaper, based on current weather and time A python script that changes your computer's desktop background based on current weath

A simple script written using symbolic python that takes as input a desired metric and automatically calculates and outputs the Christoffel Pseudo-Tensor, Riemann Curvature Tensor, Ricci Tensor, Scalar Curvature and the Kretschmann Scalar

A simple script written using symbolic python that takes as input a desired metric and automatically calculates and outputs the Christoffel Pseudo-Tensor, Riemann Curvature Tensor, Ricci Tensor, Scalar Curvature and the Kretschmann Scalar

 WhyNotWin11 - Detection Script to help identify why your PC isn't Windows 11 Release Ready
WhyNotWin11 - Detection Script to help identify why your PC isn't Windows 11 Release Ready

WhyNotWin11 - Detection Script to help identify why your PC isn't Windows 11 Release Ready

A script that will warn you, by opening a new browser tab, when there are new content in your favourite websites.
A script that will warn you, by opening a new browser tab, when there are new content in your favourite websites.

web check A script that will warn you, by opening a new browser tab, when there are new content in your favourite websites. What it does The script wi

An event-based script that is designed to improve your aim

Aim-Trainer Info: This is an event-based script that is designed to improve a user's aim. It was built using Python Turtle and the Random library. Ins

A python script to get your activity

activities A python script to get your activity Not complete Requirements Python (=3.7) Pip (for python = 3.7) Git Pip packages psutil asyncio aioht

Releases(v1.0.2)
Owner
SeaRoth
Beep boop
SeaRoth
A python script for combining multiple native SU2 format meshes into one mesh file for multi-zone simulations.

A python script for combining multiple native SU2 format meshes into one mesh file for multi-zone simulations.

MKursatUzuner 1 Jan 20, 2022
a wordle-solver written in python

Wordle Solver Overview This is yet another wordle solver. It is built with the word list of the official wordle website, but it should also work with

Shoubhit Dash 10 Sep 24, 2022
Simple Python API for the Ergo Platform Explorer

Ergo is a "Resilient Platform for Contractual Money." It is designed to be a platform for applications with the main focus to provide an efficient, se

7 Jul 06, 2021
Library for RadiaCode-101

RadiaCode Библиотека для работы с дозиметром RadiaCode-101, находится в разработке - API не стабилен и возможны изменения. Пример использования (backe

Maxim Andreev 56 Nov 29, 2022
A Desktop application for the signalum python library

Signalum Desktop A Desktop application on the Signalum Python Library/CLI Tool. The Signalum Desktop application is an attempt to develop a single too

BISOHNS 35 Feb 15, 2021
Jogo em redes similar ao clássico pedra papel e tesoura

Batalha Tática Tecnologias de Redes de Computadores-A-N-JOGOS DIGITAIS Professor Fabio Henrique Cabrini Alunos: Eric Henrique de Oliveira Silva - RA 1

Eric Henrique de Oliveira Silva 1 Dec 01, 2021
Convert Photoshop curves (acv) to xmp presets for Lightroom

acv2xmp Convert Photoshop curves (acv) to Lightroom preset (xmp) acv2xmp.py Basic command prompt that relies on standard library only and can be used

5 Feb 06, 2022
Esercizi di Python svolti per il biennio di Tecnologie Informatiche.

Esercizi di Python Un piccolo aiuto per Sofia che nel 2° quadrimestre inizierà Python :) Questo repository (termine tecnico di Git) puoi trovare tutti

Leonardo Essam Dei Rossi 2 Nov 07, 2022
Fiber implements an proof-of-concept Python decorator that rewrites a function

Fiber implements an proof-of-concept Python decorator that rewrites a function so that it can be paused and resumed (by moving stack variables to a heap frame and adding if statements to simulate jum

Tyler Hou 225 Dec 13, 2022
A small project of two newbies, who wanted to learn something about Python language programming, via fun way.

HaveFun A small project of two newbies, who wanted to learn something about Python language programming, via fun way. What's this project about? Well.

Patryk Sobczak 2 Nov 24, 2021
Pixelarticons - Pixel Art Icons made simple for Flutter, powered by pixelarticons and fontify

Pixelarticons - Pixel Art Icons made simple for Flutter, powered by pixelarticons and fontify

lask 16 Dec 12, 2022
A tutorial presents several practical examples of how to build DAGs in Apache Airflow

Apache Airflow - Python Brasil 2021 Este tutorial apresenta vários exemplos práticos de como construir DAGs no Apache Airflow. Background Apache Airfl

Jusbrasil 14 Jun 03, 2022
My custom Fedora ostree build with sway/wayland.

Ramblurr's Sway Desktop This is an rpm-ostree based minimal Fedora developer desktop with the sway window manager and podman/toolbox for doing develop

Casey Link 1 Nov 28, 2021
Model synchronization from dbt to Metabase.

dbt-metabase Model synchronization from dbt to Metabase. If dbt is your source of truth for database schemas and you use Metabase as your analytics to

Mike Gouline 270 Jan 08, 2023
Earth centric orbit propagation tool. Built from scratch in python.

Orbit-Propogator Earth centric orbit propagation tool. Built from scratch in python. Functionality includes: tracking sattelite location over time plo

Adam Klein 1 Mar 13, 2022
An extension for Arma 3 that lets you write extensions in Python 3

An Arma 3 extension that lets you to write python extensions for Arma 3. And it's really simple and straightforward to use!

Lukasz Taczuk 48 Dec 18, 2022
A tool converting rpk (记乎) to apkg (Anki Package)

RpkConverter This tool is used to convert rpk file to Anki apkg. 如果遇到任何问题,请发起issue,并描述情况。如果转换rpk出现问题,请将文件发到邮箱 ssqyang [AT] outlook.com,我会debug并修复问题。 下

9 Nov 01, 2021
Object-oriented programming exercise session held in Petnica.

OOP vežba ⚠️ The code in this repo is used for a OOP practice session held in Petnica. All instructions in the README file are written in Serbian. Ops

Pavle Ćirić 1 Jan 30, 2022
Magenta: Music and Art Generation with Machine Intelligence

Magenta is a research project exploring the role of machine learning in the process of creating art and music. Primarily this involves developing new

Magenta 18.1k Jan 05, 2023
python scripts - mostly automation scripts

python python scripts - mostly automation scripts You can set your environment in various ways bash #!/bin/bash python - locally on remote host #!/bi

Enyi 1 Jan 05, 2022