@echo off

REM     UseTimeBOARD file used to run PCBoard.
REM     To put PCBoard online, run this file.

CLS

REM     Check if remote sysop is trying to run this file.
IF EXIST remote.bat GOTO inremote

ECHO   Any pending events will be run before putting PCBoard online.
ECHO   Press the ESCAPE key to go directly to PCBoard.
ECHO.
utwait 4
IF ERRORLEVEL 1 GOTO skipevent

:begin
REM     Run the USETIME event file for a specific hour.
REM     For example, event15.bat will run at the 15th hour.
usetime IF EXIST event$H.BAT IF NOT EXIST event$H.ran event$H.bat

:skipevent
REM      Run PCBoard
COMMAND /E:512 /C board

CLS
ECHO   Press the ESCAPE key to exit UTBOARD.
utwait 4
IF ERRORLEVEL 1 GOTO dos

REM Re-cycle
GOTO begin

:inremote
ECHO Cannot run UTBOARD from remote. Use EXIT to return to PCBoard.
goto exit

:dos
REM Exit to DOS
ECHO   Type UTBOARD to put PCBoard online.

:exit
