Code: Select all
$time = (strlen($_POST['agenttime']) < 5)? '0'.$_POST['agenttime'] : $_POST['agenttime'];
$command = 'schtasks /create /tn AP_Search_Agent /tr "php -q '.$path.'admin\\run-agent.php" /sc DAILY /st '.$time.':00 /ru "System"';
$result = shell_exec($command);Thanks