Implementation of PHP scheduled tasks and scheduled execution tasks
The functions used ignore_user_abort(), set_time_limit(0), sleep($interval)
You only need to run this code once and then close the browser.
I don’t know if the performance of the program will be greatly affected!
ignore_user_abort();//Close the browser, and the PHP script can continue to execute.
set_time_limit(0);//The program can be executed without limit through set_time_limit(0)
$interval= 60*30;//Run every half hour
do{
//Here is the code you want to execute
sleep($interval);//Wait for 5 minutes
}while(true) ;