How can I pass variables to a php script in the windows task scheduler?
In the Task Scheduler in "Action" I enter:
$varB = $_GET['B'];
$varC = $_GET['C'];
$varA = $_GET['A'];
You can't do this on the command line,
$_POST, etc are all constructed from the web server.
What you can do is use proper command-line arguments like:
C:\php\php.exe C:\scripts\myscript.php 1 2 "arg with space"
And access them with
$var1 = $argv; // 1 $var2 = $argv; // 2 $var3 = $argv; // arg with space
And just for clarity's sake,
$argv is always the name of the script.
Edit: For even more clarity's sake
$argc contains the number of arguments passed.