Home > Topics > Pagoda Panel > body text

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

藏色散人
Release: 2022-01-22 11:02:55
forward
8017 people have browsed it

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;
    
    
?>
Copy after login

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

#/
php /www/wwwroot/jx.kissxx.cn/public/jrsy.php
Copy after login

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!

Related labels:
php
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template