-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMineSwitcher.bat
More file actions
63 lines (58 loc) · 2.24 KB
/
MineSwitcher.bat
File metadata and controls
63 lines (58 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
REM To use MineSwitcher simply put it in a directory above your miners and change the config starting on line 7
@echo off
setlocal enabledelayedexpansion
title=MineSwitcher
set length=-1
REM ///////////////////////////////// CONFIG ////////////////////////////////////
REM the amount of time each coin is mined in hours(no decimal places, must be whole numbers).
set Time=1
set HalfHours=1
REM MinersList gives each miner an index, if you want three miners it would be "0 1 2" and so on
set MinersList=0 1
REM Miners are the name of the actual task process for the specified index
set Miners[0]="PhoenixMiner.exe"
set Miners[1]="miner.exe"
Rem Coins sets coin names to verify indices are correct
set Coins[0]=Ethereum
set Coins[1]=Raven
Rem Paths sets the location of your regular start files
set Paths[0]=PhoenixMiner_5.8c_Windows\mine_eth.bat
set Paths[1]=gminer_2_74_windows64\mine_ravencoin.bat
REM //////////////////// for ease of use do not edit below this line //////////////////////////
REM ///////////////////////////////// Start Mine Switcher ////////////////////////////////////
set /a Timeout=60*60*!Time!
set /a Timeout2=60*30*!HalfHours!
echo Chosen to mine each coin for !Time! hour(s) and !HalfHours! half hour(s)
timeout /t 1 >null
REM find how many miners specified and display them
(for %%i in (%MinersList%) do (set /a length+=1))
set /a len=!length!+1
echo Miners Specified: !len!
(for /l %%h in (0,1,!length!) do (echo !Coins[%%h]!))
timeout /t 1 >null
REM main loop
:loop
(for /l %%b in (0,1,!length!) do (
timeout /t 1 >null
echo MineSwitcher: !Coins[%%b]!
echo attempt to stop all miners
timeout /t 1 >null
REM ///////////////////////////////// Kill Task Code////////////////////////////////////
(for /l %%a in (0,1,!length!) do (
echo chosen to kill !Miners[%%a]!
tasklist | find /i !Miners[%%a]! && taskkill /im !Miners[%%a]! /F || echo task !Miners[%%a]! not running.
timeout /t 1 >null
))
REM ////////////////////////////////////////////////////////////////////////////////////
timeout /t 1 >null
echo starting miner !Miners[%%b]!
title=MineSwitcher: !Coins[%%b]!
timeout /t 1 >null
start /b "!Coins[%%b]!" "!Paths[%%b]!"
set /a Timer=!Timeout! + !Timeout2!
echo waiting for !Timer! seconds
timeout /t !Timer! >null
))
goto loop
REM stop after each line
pause