Use the Windows "Task Scheduler" application to configure a task by choosing "Create Basic Task..." that periodically runs run a "Program" with the following "Parameter" and "Argument".
✓ Program "C:\Program Files (x86)\php74\php.exe"
✓ Parameter "-f %WEB_ROOT%\src\reports\backend_exe.php 1"
✓ Argument "Command identifier = 1 (or other number). See description below"
Where %WEB_ROOT% is the full path to the "htdocs" folder, as set in the "php.ini" file.
"Argument = 1" (Read from INI file to buffer. Default = 1 min.)
"Argument = 2" (Write from buffer to databases. Default = 10 min.)
"Argument = 3" (Read via REST API to buffer. Default = 1 min.)
Argument is a parameter that distinguishes report executions from the "Task Scheduler" application.
Information: Additionally, the program can also be executed directly from a host application (such as
SIMATIC WinCC, TIA Portal, etc.) by using a script or command call to trigger the executable.
This allows the application to be started automatically based on events, tag changes, or other logic defined within the host system.
Example usage in a host script:
WinCC [C++] : ProgramExecute("php-win.exe -f C:\\Projects\\SRCReports\\htdocs\\src\\reports\\backend_exe.php 1");
TIA Portal [VBS] : ProgramExecute "php-win.exe", "-f C:\Projects\SRCReports\htdocs\src\reports\backend_exe.php 3"