Auto restart possible?

@Insolent Autorun.bat updated, added option in config to disable miner daily restart (but it must restarts 1 time at month, because of errors and incorrect data of “how many miner works” row).

@astronyu Autorun.bat updated, added option in config to disable “Begin mining” question. Please, check it, configure script and response me in case of errors :slight_smile:

To all other! Please delete old config.bat and let script to create new one!
Thank you!

2 Likes

@Undertrey
Really great work.
Can you add command:
Restart miner every 15 days (or give us a choice to add how many days)
Restart windows every 15 days (or give us a choice to add how many days)

It is possible! I will think about it :slight_smile:
One problem: for example today is 20.08.2017, i put restart every 15 days, script can count only to 31.08, and then can be problems… need think how to do this count.

1 Like

Instead of counting days, convert it into hours.

how about working with timestamps?

1 Like

True! Thank you
@johnwisdom thank you too :slight_smile:
Ok. in next update will be new function! Maybe something else?

1 Like

Understood but what does " SET EnableGPUOverClockControl=2" do?

Check process of overcklock program launched or not, if not - launch
Overcklock control working with “averagehashrate” and summary gives nice rig monitoring.
You dont need to worry about overcklock loss on your rig, script do all soft restart and if it not help - restarts your computer.

All day I thinking about this feature. Trying to code some, really it is not a problem to realize, but… many lines of code :frowning: I think it is no needed function, because it is already exist in Windows Task Scheduler.

Script updated, added logging function. Option in config.bat to disable this feature added too. By default it is ON.
Now all errors, warnings and some notifications (like start miner.bat, overclock program and additional utility) will be written into autorun.log.

3 Likes

@sverox can you add a folder to house all the log files? and an option to delete them every X hours?

Not sure miner.exe support path folder in logfile name parameter.
Cannot check now - i on vacation to 8.Sep.2017.
After back - if still interest (or maybe accord to new version miner) will check.

Edit:
Temporary fast workaround (on every restart moves last log to logs directory, in current directory is current log, is used to check 0 sols state ):
Add/edit to script section

============================
   
:aProcessNotFound
@echo %EXE% is NOT Running...
@echo %EXE% attempt Start...
set /a varRuns=%varRuns%+1

md "%MINERPATH%\logs"
move "%MINERPATH%\%varLogFile%" "%MINERPATH%\logs\%varLogFile%"

for /f %%A in ('doff') do set varLogFile=z_%%A_.txt
@echo %varLogFile%

start /i /d "%MINERPATH%\" %EXE% --server %zecServer% --user %tAddress%.%wrkrName% --log 2 --logfile %varLogFile% %varExtraOptions%

@goto aLoopEND

============================

Fantastic. Thank you.

Script updated to 1.0.3.0, so it is stable now, fixed all problems that was reported. Now need to fix mistakes on English sentences :smile: Help me, please, to do that, report for any grammatical mistakes.

@astronyu about your error with closing script - fixed, it was a date/time format issue, because on each country windows have own date/time format. For me it is 07.08.2017 10:25:15, for some guy from USA it is Mon 2017/08/07 10:25:15, another countries have another delims like “/” “-” “:” etc, and my script start giving an error because of this differences.

@sverox gives you a CMD/BATCH solution for date/time issue, if you don`t know about it :slight_smile:

FOR /F %%a IN ('wmic.exe OS GET localdatetime ^| findstr [1]') DO SET t0=%%a
SET Y0=%t0:~0,4%
SET M0=%t0:~4,2%
SET D0=%t0:~6,2%
SET H0=%t0:~8,2%
SET X0=%t0:~10,2%
SET C0=%t0:~12,2%

I just parse it from wmic.exe :smiley: Stop using this %date% and %time%, they are buggy…


  1. 0-9 ↩︎

I not use %date% and %time%, I notice Windows locale issue with %date% and %time% and this reason use third party doff.exe tool for get timestamp for log filename.

Not have any plans to enhance this (my) script. Is works and is OK for my own needs.

Every new comer i recommend use your script - is better and is good and tons of features.
And i think you should post it in bitcointalk

As i write before have plans for code GUI watchdog/monitor (.NET) with lot features but is long-term plans (depend what new EWBF if any versions will include or not, depend my own schedule, and some other things).

Thank you! I will think about it. wmic.exe it is good opinion or better is diff.exe?
Yes i will post it soon on bitcointalk, on version 1.0.2.3 i think, need to optimise code, fix grammatical errors, and test script. On bitcointalk many peoples, I dont want to have many bugreports :slight_smile:

About .NET GUI, if you start to code it, contact me, maybe I will help with testing, features/ideas, optimisations.

2 Likes

wmic.exe is good as part of windows.
doff.exe is third party tool.

Hey, it is working however I get stuck everytime dev fee should be accepted. My miner wasn’t working whole night because of that. One Ctrl + C solved it then…

  1. Disable fee with –fee 0

and/or

  1. Right click on miner console title bar window and choose properties.
    Uncheck “QuickEdit Mode”.
    This prevent pause on console window when it get focus/click.

I’m using a batch file on windows that restarts all miner every hour.

If a process dies it would be max 1 hour offline.

Pretty simple but it does the job for me

i tried your script and it is fail. once the miner detects 0 sol/s, the miner is restarted but then every 60 seconds it restarts! it seems the script is still looking at the 0 sol/s in the logfile.