31 Dec 2018: Thank you to our knowledgeable and friendly forums users for another great year. We are aware of the uptick in spam accounts and are doing our best to ban these at first sight. Thank you for your patience!

script to run a rule

Dear all,
If you want to schedule the execution of a Rule, or of all the Rules of a CRF, you can use the following script, change it to match your situation and save it as a *.vbs.
If you want to read more about the why's and how's, go to 
Kind regards,
Gerben Rienk
Option explicit
Dim objIEDebugWindow
Dim objHTTP
Dim strURLStart
Dim strURL 
Dim strReq 

If WScript.Arguments.Count <> 3 then
WScript.Echo "Missing parameters. This script needs: "_
& VbNewLine & "username, password and CRFID or RuleSetID"_
& VbNewLine & "to run correctly."
Set objHTTP = CreateObject("MSXML2.XMLHTTP")
strURL = strURLStart & "j_spring_security_check?j_username=" & WScript.Arguments(0) 
strURL = strURL & "&j_password=" & WScript.Arguments(1)
objHTTP.Open "POST", strURL, False

'choose one of the following: 
'this first line will run all Rules for a CRF, 
'strURL = strURLStart & "RunRule?crfId=" & WScript.Arguments(2) & "&action=true"
'this second line will run one RuleSet
strURL = strURLStart & "RunRuleSet?ruleSetId=" & WScript.Arguments(2) & "&dryRun=no"

objHTTP.Open "GET", strURL, False
End if


This discussion has been closed.