Hey,
I have an acsauto script driven by a .bat file driven by a scheduled task set to run every minute, to extract the realtime data to csv.
It will run successfully for a number of minutes to hours but then it will halt with a Message Box Error of "Attempt to Access Invalid Address".
This unfortunately will halt the .bat and it will not recover without intervention.
How can I better improve the resiliency of this process?
Is there any official manual on the acsauto scripting?
everyminute.bat
AGR.acsauto
I have an acsauto script driven by a .bat file driven by a scheduled task set to run every minute, to extract the realtime data to csv.
It will run successfully for a number of minutes to hours but then it will halt with a Message Box Error of "Attempt to Access Invalid Address".
This unfortunately will halt the .bat and it will not recover without intervention.
How can I better improve the resiliency of this process?
Is there any official manual on the acsauto scripting?
everyminute.bat
Code:
taskkill /F /IM ACS* /T
taskkill /F /IM acs* /T
rem Running the realtime report
start /WAIT "" "H:\Agent Group Realtime\AGR.acsauto"
AGR.acsauto
Code:
'LANGUAGE=ENU
'SERVERNAME=1.2.3.4
Public Sub Main()
On Error Resume Next
dtvar = Now
dvar = year(dtvar)&right("0"&month(dtvar),2)&right("0"&day(dtvar),2)
tvar = right("0"&Hour(dtvar),2)&right("0"&Minute(dtvar),2)
minvar = right("0"&Minute(dtvar),2)
fnvar = dvar&tvar
cvsSrv.Reports.ACD = 2
Set Info = cvsSrv.Reports.Reports("Real-Time\Agent\Agent Group Report")
If Info Is Nothing Then
If cvsSrv.Interactive Then
MsgBox "The report Real-Time\Agent\Agent Group Report was not found on ACD 2.", vbCritical Or vbOKOnly, "Avaya CMS Supervisor"
Else
Set Log = CreateObject("ACSERR.cvsLog")
Log.AutoLogWrite "Real-Time\Agent\Agent Group Report was not found on ACD 2"
Set Log = Nothing
End If
Else
b = cvsSrv.Reports.CreateReport(Info,Rep)
Rep.TimeZone = "UTC"
Rep.SetProperty "Agent Group","AG1"
b = Rep.ExportData("H:\Documents\Agent Group Realtime\AG1 - "&fnvar&".csv", 44, 1, False, True, True)
b = cvsSrv.Reports.CreateReport(Info,Rep)
Rep.TimeZone = "UTC"
Rep.SetProperty "Agent Group","AG2"
b = Rep.ExportData("H:\Documents\Agent Group Realtime\AG2 - "&fnvar&".csv", 44, 1, False, True, True)
b = cvsSrv.Reports.CreateReport(Info,Rep)
Rep.TimeZone = "UTC"
Rep.SetProperty "Agent Group","AG3"
b = Rep.ExportData("H:\Documents\Agent Group Realtime\AG3 - "&fnvar&".csv", 44, 1, False, True, True)
b = cvsSrv.Reports.CreateReport(Info,Rep)
Rep.TimeZone = "UTC"
Rep.SetProperty "Agent Group","AG4"
b = Rep.ExportData("H:\Documents\Agent Group Realtime\AG4 - "&fnvar&".csv", 44, 1, False, True, True)
Rep.Quit
' Kills active report & server
If Not cmsServer.Interactive Then
cmsServer.ActiveTasks.Remove cmsReport.TaskID
cmsApplication.Servers.Remove cmsServer.ServerKey
End If
' Logs out
cmsReport.Quit
cmsConnection.Logout
cmsConnection.Disconnect
cmsServer.Connected = False
' Releases objects
Set cmsReport = Nothing
Set cmsCatalog = Nothing
Set cmsConnection = Nothing
Set cmsServer = Nothing
Set cmsApplication = Nothing
Set Info = Nothing
End If
End Sub