I'm trying to schedule a codeigniter php file in Windows Task Scheduler.
I have tried using .bat file as follows:
php E:\UniServerZ\index.php mailtry mailsend
where mailtry is controller name and mailsend is controller function
I have also tried scheduling using powershell script using url as follows:
First:
powershell -ExecutionPolicy Bypass -Command
Invoke-WebRequest 'https://abcd.hub/abcd/mailtry/mailsend' -UseBasicParsing
Second:
$url = "https://abcd.hub/abcd/mailtry/mailsend"
PowerShell Invoke-WebRequest -Uri $url -Method GET
Third:
explorer "https://abcd.hub/abcd/mailtry/mailsend"
Nothing works. How to schedule this? Any help is much appreciated.

Nothing worksisn't a useful description of your problem. What exactly goes wrong when you try these various approaches? We can't fix a problem if we don't know what the specific fault is, and we also don't know what your PHP code looks like.https://abcd.hub/abcd/mailtry/mailsendinto your browser it would work no problem and send the mail?Invoke-WebRequest -Uri $url -Method GET, does it send the request? You can use a network monitor to test, if you don't get any output from powershell directly, and/or you can check the server logs, see if it received the request or not, and what status code it had. In other words, there's plenty more debugging you can do here to discover precisely what is happening / not happening. Narrow it down.