I
I
Ivan Shumakov2020-01-21 08:42:37
PHP
Ivan Shumakov, 2020-01-21 08:42:37

How to run a PHP script using the Windows Scheduler with the same settings as it runs on the web?

Wampserver is deployed on Windows Server 2012. There is a PHP script for working with databases and Bitrix24 RestAPI, it is correctly executed when I access it from a browser. There is a need to run this script on a schedule. I have created a .bat file which links to the same PHP version selected in Wampserver. The problem is that PHP returns an SSL certificate error when running it. As I understand it, the scheduler runs the script with different settings, because before I already had to duplicate the settings. What needs to be done to make the scheduler run PHP with the same settings? Or maybe I'm misunderstanding the situation - what should I do to make the script work correctly?

start "set packages' data" "C:\wamp64\bin\php\php7.1.29\php.exe" -f C:\my\directory\set_packages.php

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shamanov, 2020-01-21
@SilenceOfWinter

https://www.php.net/manual/ru/features.commandline...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question