ARGC,ARGV useful when compiling programs with the command line
We will find such parameters in the timed task script, $obj->run ($argv [1]);
*/30 * * * */usr/local/bin/php/htdocs/test.com/uaqm/commands/test.php 1 >/dev/null 2>&1
Just like the timer task above, if we call him with the parameter $argv[1], that means the first string that executes the program name in the DOS command line in the script
That's the Red 1 in the script above, if we deploy the scheduled tasks listed below
*/30 * * * */usr/local/bin/php/htdocs/test.com/uaqm/commands/test.php 1 >/dev/null 2>&1
*/30 * * * */usr/local/bin/php/htdocs/test.com/uaqm/commands/test.php 2 >/dev/null 2>&1
*/30 * * * */usr/local/bin/php/htdocs/test.com/uaqm/commands/test.php 3 >/dev/null 2>&1
So we think that this task is running in three processes, which means that the pressure becomes the original one-third, so it's easy to understand.
The official explanations for these two keywords are released below.
ARGC: Integer that counts the number of command-line arguments you give to the main function when you run the program
* argv: A string array that holds an array of pointers to your string arguments, each of which points to a parameter
Argv[0] point to the full path name of the program running
ARGV[1] points to the first string after executing the program name on the DOS command line
ARGV[2] points to the second string after executing the program name
ARGV[ARGC] is null