FEAT_GMAIL RESPONSE HELPER ADDED
This commit is contained in:
parent
01b30e4360
commit
a552e06adf
@ -1 +0,0 @@
|
||||
1
|
||||
42
phpqueue.bat
42
phpqueue.bat
@ -1,42 +0,0 @@
|
||||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
REM Get the directory of the current script
|
||||
set "ROOT_DIR=%~dp0"
|
||||
set "JOB_QUEUE_FILE=%ROOT_DIR%job_queue"
|
||||
set "PID_FILE=%ROOT_DIR%phpqueue.pid"
|
||||
|
||||
REM Check if the script is already running
|
||||
if exist "%PID_FILE%" (
|
||||
for /f "tokens=*" %%i in (%PID_FILE%) do set PID=%%i
|
||||
tasklist /fi "PID eq !PID!" | findstr /i "!PID!" >nul
|
||||
if not errorlevel 1 (
|
||||
echo phpqueue.bat is already running. Exiting.
|
||||
exit /b
|
||||
)
|
||||
)
|
||||
|
||||
REM Write the current process ID (PID) to the PID file
|
||||
echo %PROCESS_ID% > "%PID_FILE%"
|
||||
|
||||
REM Main loop
|
||||
:loop
|
||||
REM Check if the Job_Queue file exists
|
||||
if not exist "%JOB_QUEUE_FILE%" (
|
||||
echo Job Queue file not found.
|
||||
exit /b
|
||||
)
|
||||
|
||||
REM Read the value of Job_Queue from the file
|
||||
set /p Job_Queue=<%JOB_QUEUE_FILE%
|
||||
|
||||
if "%Job_Queue%"=="1" (
|
||||
REM Run PHP job processing
|
||||
php "%ROOT_DIR%htdocs/nhance/public/index.php" cli/processjob
|
||||
) else (
|
||||
echo No job to process.
|
||||
)
|
||||
|
||||
REM Sleep for 1 second before the next iteration
|
||||
timeout /T 1 >nul
|
||||
goto loop
|
||||
@ -1 +0,0 @@
|
||||
575
|
||||
@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Validate input argument
|
||||
# if [[ "$1" == "1" ]]; then
|
||||
# echo "1" > /opt/lampp/htdocs/nhance/Job_Queue
|
||||
# echo "Job Queue variable has been set to: 1"
|
||||
# elif [[ "$1" == "0" ]]; then
|
||||
# echo "0" > /opt/lampp/htdocs/nhance/Job_Queue
|
||||
# echo "Job Queue variable has been set to: 0"
|
||||
# else
|
||||
# echo "Invalid argument. Use 1 to enable the queue or 0 to disable it."
|
||||
# exit 1
|
||||
# fi
|
||||
Loading…
Reference in New Issue
Block a user