Scheduled Task with Calls to PI fails from service account

Discussion created by IJourneaux on Feb 21, 2020
Latest reply on Feb 28, 2020 by IJourneaux

I have a spreadsheet that has some VBA code that I want to execute once a day every day.  Under Windows, I can configure up a scheduled task that correctly launches the spreadsheet, queries PI saves the results then exits.  If I try to set this up to run when I am not logged in the scheduled task does not run correctly.

I am using a VBS script to launch excel with a specific workbook


strPath = "C:\Users\Public\Documents\Monticello PM2 Winder\Winder V20-MON-PM2.xlsm"

strMacro = "ReadData"

Set objApp = CreateObject("Excel.Application")

objApp.Visible = False

Set wbToRun = objApp.Workbooks.Open(strPath)

objApp.Run strMacro ' wbToRun.Name & "!" & strMacro





If I run under my credentials when I am logged on, it works.  When I use the service account I get in the event viewer. Any though on what I need to do to get this to run?


A Kerberos error message was received:
on logon session GPNET\winder_report
Client Time:
Server Time: 19:24:1.0000 2/21/2020 Z
Extended Error:
Client Realm:
Client Name:
Server Realm: GPNET
Server Name: krbtgt/GPNET
Target Name: krbtgt/GPNET@GPNET
Error Text:
File: onecore\ds\security\protocols\kerberos\client2\logonapi.cxx
Line: e1c
Error Data is in record data.