Well I discovered an "issue" in my script. The WScript.Sleep doesn't work, so the report is blasting through at the speed of light and running the report as fast as it can. But it hasn't caused issues so I'm going to leave it.
I did find how to add a pause so here is what you will need to do first.
Open Wordpad or Notepad and enter:
WScript.Sleep(5000)
Save it as Sleep.vbs in the same directory that the cms script is going to be saved. The 5000 will pause for 5 seconds.
I noticed that you have this set as an interactive script. If you are going to want this to launch automatically, you can simply change the extension to .ascauto, it will still work. Then in the CMS application that is installed on the server/pc that will run this report, you'll need to enter the user name and password under Scripting in the Tool | Options menu. Then you can use the Windows Scheduler as I described above. One issue I ran into was when we changed all the logins to use SSH, it won't work automatically if you have to login with SSH, only telnet logins will work.
Here is your modified script:
'LANGUAGE=ENU
'SERVERNAME=sl-CMS
Public Sub Main()
'## cvs_cmd_begin
'## ID = 2001
'## Description = "Report: Real-Time: CMS custom: Telegenix: Export Data"
'## Parameters.Add "Report: Real-Time: CMS custom: Telegenix: Export Data","_Desc"
'## Parameters.Add "Reports","_Catalog"
'## Parameters.Add "2","_Action"
'## Parameters.Add "1","_Quit"
'## Parameters.Add "Real-Time\CMS custom\Telegenix","_Report"
'## Parameters.Add "1","_ACD"
'## Parameters.Add "2400","_Top"
'## Parameters.Add "3540","_Left"
'## Parameters.Add "9510","_Width"
'## Parameters.Add "8325","_Height"
'## Parameters.Add "The report Real-Time\CMS custom\Telegenix was not found on ACD 1.","_ReportNotFound"
'## Parameters.Add "*","_BeginProperties"
'## Parameters.Add "256;150;151;152;153;154;155;156;157;158;159;160;460;459;458;457;456;455;454;453;452;451;450;463;464;171;173;170","Split(s)/Skill(s)"
'## Parameters.Add "*","_EndProperties"
'## Parameters.Add "*","_BeginViews"
'## Parameters.Add "*","_EndViews"
'## Parameters.Add "C:\Users\demo\AppData\Roaming\Avaya\CMS Supervisor R16\Profiles\demo\Scripts\test.acsup","_Output"
'## Parameters.Add "9","_FldSep"
'## Parameters.Add "0","_TextDelim"
'## Parameters.Add "False","_NullToZero"
'## Parameters.Add "False","_Labels"
'## Parameters.Add "True","_DurSecs"
On Error Resume Next
Set WshShell = CreateObject("WScript.Shell")
theSleepFile = "C:\Users\demo\AppData\Roaming\Avaya\CMS Supervisor R16\Profiles\demo\Scripts\Sleep.vbs"
Do While count < 1
WshShell.Run "wscript.exe """ & theSleepFile & """", ,true
cvsSrv.Reports.ACD = 1
Set Info = cvsSrv.Reports.Reports("Real-Time\CMS custom\Telegenix")
If Info Is Nothing Then
If cvsSrv.Interactive Then
MsgBox "The report Real-Time\CMS custom\Telegenix was not found on ACD 1.", vbCritical Or vbOKOnly, "Avaya CMS Supervisor"
Else
Set Log = CreateObject("ACSERR.cvsLog")
Log.AutoLogWrite "The report Real-Time\CMS custom\Telegenix was not found on ACD 1."
Set Log = Nothing
End If
Else
b = cvsSrv.Reports.CreateReport(Info,Rep)
If b Then
Rep.Window.Top = 2400
Rep.Window.Left = 3540
Rep.Window.Width = 9510
Rep.Window.Height = 8325
Rep.SetProperty "Split(s)/Skill(s)","256;150;151;152;153;154;155;156;157;158;159;160;460;459;458;457;456;455;454;453;452;451;450;463;464;171;173;170"
b = Rep.ExportData("C:\Users\demo\AppData\Roaming\Avaya\CMS Supervisor R16\Profiles\demo\Scripts\tesst.acsup", 9, 0, False, False, True)
Rep.Quit
If Not cvsSrv.Interactive Then cvsSrv.ActiveTasks.Remove Rep.TaskID
Set Rep = Nothing
End If
End If
Set Info = Nothing
Loop
'## cvs_cmd_end
End Sub
- Stinney
"Scire ubi aliquid invenire possis, ea demum maxima pars eruditionis est"
"To know where to find anything is, after all, the greatest part of education"