14 lines
581 B
Batchfile
14 lines
581 B
Batchfile
@echo off
|
|
setlocal
|
|
set "SCRIPT_DIR=%~dp0"
|
|
set "LOG_DIR=%SCRIPT_DIR%..\..\runtime\private\wangshang-mail\logs"
|
|
if not exist "%LOG_DIR%" mkdir "%LOG_DIR%"
|
|
set "PWSH=%ProgramFiles%\PowerShell\7\pwsh.exe"
|
|
if exist "%PWSH%" goto run
|
|
set "PWSH=%USERPROFILE%\.cache\codex-runtimes\codex-primary-runtime\dependencies\native\powershell\pwsh.exe"
|
|
if exist "%PWSH%" goto run
|
|
set "PWSH=pwsh.exe"
|
|
:run
|
|
"%PWSH%" -NoProfile -ExecutionPolicy Bypass -File "%SCRIPT_DIR%run-wangshang-mail-daily.ps1" >> "%SCRIPT_DIR%..\..\runtime\private\wangshang-mail\logs\scheduler.log" 2>&1
|
|
exit /b %errorlevel%
|