Hi friends I am trying to run this cron for email functianlity. The same code is working with another system.
var strURLs = new Array("http://localhost:51611/Cron/Email.aspx");
var webObj = WScript.CreateObject("MSXML2.ServerXMLHTTP");
var lResolve = 10 * 1000;
var lConnect = 10 * 1000;
var lSend = 60000 * 1000;
var lReceive = 60000 * 1000;
webObj.setTimeouts(lResolve, lConnect, lSend, lReceive);
for (var i = 0; i < strURLs.length; i++) {
webObj.open("GET", strURLs[i], false);
try {
webObj.send();
if (webObj.status != 200 || String(webObj.statusText).match(/Database is currently unavailable/gi) != null) {
}
}
catch (e) {
}
}
I follow the steps:
Step1: Run My visual studio project at localhost
Step2: Open the command prompt
Step3: Run the following command
C:\Windows\System32>cscript.exe "D:\Projects\Cron\CronScript.js"
I receive the below error
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
D:\Projects\Cron\CronScript.js(1, 1)
Microsoft JScript runtime error:
Please guide me where I am lacking, I am looking for this since long.