greetings to all
Actually I want to run PHP code that processes the data in the database. Is there any software (other than the browser) that can do this, well, like cron when importing database in the background
greetings to all
Actually I want to run PHP code that processes the data in the database. Is there any software (other than the browser) that can do this, well, like cron when importing database in the background
php5 /path/to/your/code Some hosting providers allow you to customize the job for CRON. Thus, you can run an arbitrary php script which will do the necessary work. Ask about hosting support. If this hosting does not support this function - change the hosting.
the option of running the script through the browser is possible, but in this case, as a rule, there is a limit on the maximum execution time of the script. so the script may simply not modify and spoil the data in the database. there is no such limitation on taxi crowns, or the CRON task time is significantly more (for example, 30 seconds for a script, 1 hour for a CRON task). therefore, I highly recommend to ask about the assignment of CRON tasks to the hosting support service.
If you run the script on the crown, you usually need the /usr/bin/php -q /абсолютный/путь/к/вашему/скрипту/script.php path /usr/bin/php -q /абсолютный/путь/к/вашему/скрипту/script.php script / script /usr/bin/php -q /абсолютный/путь/к/вашему/скрипту/script.php But the path to php may be different, depending on some parameters.
Alternatively, you can run wget-ohm, that is, wget -O - -q -t 1 http://www.domain.com/path/script.php "-O -" key sets the output to the console (instead of saving to the file ), "-q" does it "silently" (without displaying on the screen), and "-t 1" indicates to make only one connection attempt. Simply put, instead of downloading, we get exactly a single “script call” at a given address.
Source: https://ru.stackoverflow.com/questions/344046/
All Articles