1. Still use PHP script to execute. Command line fill in:
Then, in the cron.php page, use $argv[1] to get the value of the first parameter q1, and $argv[2] to get the value of the second parameter q2; the value of $argv[0] is the path and file name, which is: /home/jb51.net/public_html/cron.php Second, use the wget command. wget: A non-interactive network file grabbing tool under Linux. Fill in the command line:
Notice: wget usage: wget [options] [URL]
When the wget method passes multiple parameters in the URL, the & symbol needs to be escaped, that is, \&; in addition, the absolute path URL needs to be used. Third, you can try using curl The command is:
Note: Piaoyi tried it and the first command was not executed successfully under hostmonster's cron; the second command was executed successfully under the ixwebhosting host. This is the end of this article about Linux Cron scheduled execution of PHP code with parameters. For more relevant Cron scheduled execution of PHP content, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: HTML displays ellipsis beyond the text... implemented through text-overflow
>>: CSS to implement QQ browser functions
use <div id="app"> <router-lin...
Install Ubuntu 20.04 Install NVIDIA drivers Confi...
Docker Overview Docker is an open source software...
Nginx Rewrite usage scenarios 1. URL address jump...
Cookie It is a standard way to save the state of ...
Table of contents 1. Nodes, trees, and virtual DO...
1. MYSQL installation directory Copy the code as ...
I wonder if you have ever thought about this ques...
Table of contents Table/index.js Table/model/inde...
Set the background image for the table header. Yo...
Preface Tomcat is an excellent Java container, bu...
CentOS 6 and earlier versions provide MySQL serve...
1. Introduction to Varnish Varnish is a high-perf...
Detailed example of removing duplicate data in My...
1. Rendering2. Operation steps 1. Apply for Tence...