Run Windows Task Scheduler through Web Interface [closed]

Is it possible to run (on demand), not schedule, a simple task that has already been scheduled under Windows Task Scheduler, through a web interface?

Any suggestions are appreciated.

Thank you

Info: We have Apache server running on a windows 7 enterprise machine.

Answer

You can run the scheduled task trough powershell, and you can execute powershell from php.

see https://stackoverflow.com/questions/5317315/executing-a-powershell-script-from-php for an example

Note that there’s a native powershell web access in windows server 2012 (and powershell can connect to a remote workstation) :

Windows PowerShell® Web Access, first introduced in Windows Server® 2012, acts as a Windows PowerShell gateway, providing a web-based Windows PowerShell console that is targeted at a remote computer. It enables IT Pros to run Windows PowerShell commands and scripts from a Windows PowerShell console in a web browser, with no Windows PowerShell, remote management software, or browser plug-in installation necessary on the client device. All that is required to run the web-based Windows PowerShell console is a properly-configured Windows PowerShell Web Access gateway, and a client device browser that supports JavaScript® and accepts cookies.

source : https://technet.microsoft.com/en-us/library/Hh831611.aspx

Attribution
Source : Link , Question Author : Charlie , Answer Author : Community

Leave a Comment