The next E2B 1.67 Beta c will include the grub4dos batch file dow.g4b
dow.g4b takes 3 parameters: year month day-of-month
and returns the grub4dos variable dow which is a number from 0-6 (0-Sunday, 1-Monday, etc.).
This means you can call it to test what day of the week it is.
For instance, you can call dow.g4b like this:
and test dow like this:
# only allow use at weekends
dow.g4b takes 3 parameters: year month day-of-month
and returns the grub4dos variable dow which is a number from 0-6 (0-Sunday, 1-Monday, etc.).
This means you can call it to test what day of the week it is.
For instance, you can call dow.g4b like this:
call /%grub%/dow.g4b %@date:~0,4% %@date:~5,2% %@date:~8,2%
if not "%dow%"=="0" if not "%dow%"=="6" halt
# don't allow at weekends, just shutdown!
if "%dow%"=="0" halt
if "%dow%"=="6" halt