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
This article mainly introduces why v-if and v-for...
Xhtml has many tags that are not commonly used but...
Table of contents Overview 0. JavaScript and Web ...
There is such a scenario: a circular container, t...
Table of contents Preface Main implementation cod...
Basically all e-commerce projects have the functi...
Many friends have always wanted to know how to ru...
I am using centos 7 64bit system here. I have tri...
Prepare 1. Download the required installation pac...
A simple calculator written in WeChat applet for ...
Preface This chapter uses basic Linux functions a...
Dockerfile is a file used to build a docker image...
HTML <div class="spinner"></di...
Table of contents 1. What is a prototype? 1.1 Fun...
Environment: CentOS 7 Official documentation: htt...