ken_nogi/NodeJS/LINEWORKS設備予約取得_/run_analyze_calendar_TODAY.bat
Kenichiro NOGI 88a402ce0f up
2026-07-10 18:13:30 +09:00

45 lines
1.0 KiB
Batchfile
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
setlocal
REM このバッチ自身の場所へ移動
cd /d "%~dp0"
REM ====== 設定値(必要に応じて編集)======
set "FORMAT=--html"
set "LOCATION=日野本社"
set "TITLE="
REM ======================================
REM 実行に使用する Node.jsスタンドアロー版
set "NODE_EXE=%~dp0scripts\node\node.exe"
if not exist "%NODE_EXE%" (
echo.
echo Error: node.exe not found at "%NODE_EXE%"
echo Please place standalone Node.js under "scripts\node".
endlocal & exit /b 1
)
set "CMD_ARGS=%FORMAT%"
REM LOCATION を指定したい場合は上の LOCATION に値を設定
if not "%LOCATION%"=="" (
set "CMD_ARGS=%CMD_ARGS% --location %LOCATION% --today"
)
REM TITLE を指定したい場合は上の TITLE に値を設定
if not "%TITLE%"=="" (
set "CMD_ARGS=%CMD_ARGS% --title %TITLE%"
)
REM バッチ実行時に渡した引数は後ろに連結(例: --out out.html
"%NODE_EXE%" scripts\analyzeCalendar.js %CMD_ARGS% %*
set "EXIT_CODE=%ERRORLEVEL%"
if not "%EXIT_CODE%"=="0" (
echo.
echo Error: analyzeCalendar.js failed. exit code=%EXIT_CODE%
)
endlocal & exit /b %EXIT_CODE%