PHP schedules and regularly executes tasks. The ignore_user_abort (), set_time_limit (0), and sleep ($ interval) functions used for PHP task scheduling and scheduled task execution can be used to close the browser once the code is run. I do not know how to implement PHP task scheduling and scheduled task execution
Functions used: ignore_user_abort (), set_time_limit (0), sleep ($ interval)
This code only needs to close the browser once it runs.
I wonder if the performance of the program will be greatly affected!
Ignore_user_abort (); // close the browser and run the PHP script.
Set_time_limit (0); // use set_time_limit (0) to allow unlimited execution of the program
$ Interval = 60*30; // run every 30 minutes
Do {
// Here is the code you want to execute
Sleep ($ interval); // wait for 5 minutes
} While (true );
The ignore_user_abort (), set_time_limit (0), and sleep ($ interval) functions used by the terminal only need to close the browser once the code is run. I do not know how...