I currently have a .vbs file being run at a daily time scheduled in a SQL Server 2005 Server Agent Job.
The "Job Step Properties" dialog contains:
Type: "Operating system (CmdExec)"
and the Command value is as follows:
"cscript d:\sites\mysite\myscheduled\script_to_run.vbs"
This works fine but I've had to upgrade the script and am now hoping to use an .ashx handler file in its place. Does anyone know how to configure the Job to execute an ashx handler file? What would the "Type" be? ActiveX Script? What would the "Command" be before the path reference? I don't want to use Task Scheduler, etc., but just want to know if it's possible to execute an ashx file in a Server Agent Job and if so what to set the "Type" and "Command" values to. Many TIA.
You can still use a CmdExec step for this.
"C:\Program Files\Internet Explorer\iexplore.exe" "http://wherever/your_handler.ashx"
You won't see the browser window open, and it may require elevated rights for the SQL Server or proxy account, but it should work.
You can also do something similar by invoking a PowerShell script using a PowerShell step type instead.
Or you could just change your VBScript to do something like this:
set wsh = CreateObject("WScript.Shell")
cmd = """C:\Program Files\Internet Explorer\iexplore.exe"" " & _
"http://wherever/your_handler.ashx"
wsh.Run cmd
set wsh = Nothing