title: Can you check the date from a Microsoft server, and set a variable for a batch file?
body: <p>I'm writing a batch file that I only want to run once a day, here is the code:</p>
  
  <pre><code>set ACTUALDATE=%date:~4,2%-%date:~7,2%-%date:~10,4%
  set /p BEFOREDATE=&lt;date.txt
  if %ACTUALDATE% == %BEFOREDATE% GOTO L
  echo %ACTUALDATE%&gt;date.txt
  start Minecraft/Launcher/Minecraft.exe
  
  C:/Python24/python.exe timer.py
  
  start "" cmd /c "echo Time is almost up!&amp;echo(&amp;pause"
  
  
  tasklist /FI "IMAGENAME eq python.exe*32" 2&gt;NUL 
  
  :L
  C:/Python24/python.exe timer2.py
  
  taskkill /f /im javaw.exe
  </code></pre>
  
  <p>This works fine, it runs and then terminates Minecraft after the time, which is judged based on the python files. This isn't the problem, the problem is that the user is not super happy about this program, and I am trying to work around the fact he can just change the date on his computer and rerun the program. </p>
  
  <p>Is there a way to set "ACTUALDATE" from a server or some sort so that he cannot change the date. If there is any way around this work around it would be greatly appreciated. </p>
  
  <p>Thank you for the help.</p>