Created
January 28, 2017 06:41
-
-
Save nemo-kaz/6544b0f57dada38f4de16ccdb5c530b6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
rem this batch will call some batch file "updateIt.bat" at each 10 days | |
rem one line of log.txt is like 2017012 ("2017 Jan 20thday") and so on, if the last line of log.txt | |
rem is different from now, the next batch file will ba called. | |
rem So we can invoke updateIt.bat at each 10 days | |
rem Good for some cleanup acitivity | |
FOR /F "delims=," %%a IN (log.txt) DO ( | |
IF %%a == %date:~0,4%%date:~5,2%%date:~8,1% ( | |
goto DONE | |
) | |
) | |
echo %date:~0,4%%date:~5,2%%date:~8,1%>> log.txt | |
echo "10 days have passed" %date:~0,4%%date:~5,2%%date:~8,1% | |
call updateIt.bat | |
:DONE | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment