Home  >  Article  >  Topics  >  How to execute timing in Pagoda shell (detailed explanation of steps)

How to execute timing in Pagoda shell (detailed explanation of steps)

藏色散人
藏色散人forward
2022-01-22 11:02:387803browse

This article is introduced by the tutorial column of Pagoda Panel on how to implement regular execution of PHP to operate the database in Pagoda shell. I hope it will be helpful to you if you need it!

Want to use Pagoda shell to clear database data regularly

1. Create these two files in any location

2. Customize the sql you want to execute in the jrsy.php file and operate the database

<?php   
    $link = mysqli_connect("localhost","数据库用户名","数据库密码","数据库名称") or die("Error " . mysqli_error($link)); //连接,test为数据库的名称  
    $query = "UPDATE yh_business SET calltoday=0" or die("Error in the consult.." .             
    mysqli_error($link));//查询  
    $result = mysqli_query($link, $query);//查询的结果  
    echo &#39;清空今日调用&#39;
    
    
?>

2. Write the shell in jrsy.sh to execute jrsy.php

#/
php /www/wwwroot/jx.kissxx.cn/public/jrsy.php

3. Specify the sh path to be executed in the shell script scheduled task

, and it will be ok.

The above is the detailed content of How to execute timing in Pagoda shell (detailed explanation of steps). For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete