Hi community!
I am working on Performance Analyzer new version. It is deployed from Catalog via cloud. Whenever we deploy from Catalog, we should get task in scheduler. On agent where this works, it is setting this task:
However, on some DMS we are getting this issue thrown in SLAutomation:
2024/12/27 18:12:51.497|SLAutomation.exe 10.5.2447.2564|19716|13004|CScriptLoader::ExitNow|DBG|-1|[Čomor Rijad] (Script Performance Analyzer_1.0.5-CU2_InstallScript_b2082c9d21f64d66a38b5a27c6aaadbb) EXIT: "Exception encountered during installation: (Code: 0x800402E2) Skyline.DataMiner.Net.Exceptions.DataMinerCOMException: The scheduled task could not be added. One of the date/time values is invalid.
---> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800402E2
Server stack trace:
at Interop.SLScheduler.ISchedulerEngine.SetInfo(String userCookie, Int32 eType, Object varData, Object& varResult)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Interop.SLScheduler.ISchedulerEngine.SetInfo(String userCookie, Int32 eType, Object varData, Object& varResult)
at Skyline.DataMiner.Net.Scheduler.SchedulerManager.<>c__DisplayClass6_0.<HandleSetSchedulerInfoMessage>b__1()
at Skyline.DataMiner.Net.Scheduler.SchedulerManager.RetryOnRemotingException(Action action)
at Skyline.DataMiner.Net.Scheduler.SchedulerManager.HandleSetSchedulerInfoMessage(IConnectionInfo connInfo, SetSchedulerInfoMessage msg)
at Skyline.DataMiner.Net.Scheduler.SchedulerManager.HandleSchedulerRequestMessage(IConnectionInfo connInfo, ISchedulerRequestMessage msg)
at Skyline.DataMiner.Net.Facade.InternalHandleClientRequestMessage(IConnectionInfo connInfo, ClientRequestMessage oneMsg, Boolean canQueue)
at Skyline.DataMiner.Net.Facade.HandleMessageInternal(IConnectionInfo connInfo, DMSMessage oneMsg, Int32 groupID, Int32 groupTotal)
at Skyline.DataMiner.Net.Facade.HandleMessage(IConnectionInfo connInfo, DMSMessage oneMsg, Int32 groupID, Int32 groupTotal)
at Skyline.DataMiner.Net.BaseFacade.HandleMessages(IConnectionInfo connInfo, DMSMessage[] msgs)
at Skyline.DataMiner.Net.Facade.HandleMessagesForClient(IConnectionInfo connInfo, DMSMessage[] messages)
at Skyline.DataMiner.Net.Transport.Remoting.InternalHandleMessages(ConnectionToken token, DMSMessage[] inputMessages, ConnectionTransportType ctt)
--- End of inner exception stack trace ---
Server stack trace:
at Skyline.DataMiner.Net.Transport.Remoting.InternalHandleMessages(ConnectionToken token, DMSMessage[] inputMessages, ConnectionTransportType ctt)
at Skyline.DataMiner.Net.Transport.Remoting.HandleMessages(ConnectionToken token, DMSMessage[] inputMessages, ConnectionTransportType ctt)
at Skyline.DataMiner.Net.Transport.Remoting.HandleMessages(ConnectionToken token, DMSMessage[] inputMessages)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Skyline.DataMiner.Net.ISLNet.HandleMessages(ConnectionToken token, DMSMessage[] inputMessages)
at Skyline.DataMiner.Net.LegacyRemotingConnection.TransportSpecificHandleMessage(ConnectionToken tok, DMSMessage[] msgs, Int32 timeout)
at Skyline.DataMiner.Net.Connection.InternalHandlePackedMessages(ConnectionToken tok, DMSMessage[] msgs, Int32 timeout)
at Skyline.DataMiner.Net.Connection.InternalHandleUnpackedMessages(DMSMessage[] msgs, Int32 timeout)
at Skyline.DataMiner.Net.Connection.HandleMessages(DMSMessage[] msgs, Int32 timeout)
at Skyline.DataMiner.Net.Connection.HandleMessage(DMSMessage msg, Int32 timeout)
at Skyline.DataMiner.Net.Connection.HandleSingleResponseMessage(DMSMessage msg)
at Skyline.DataMiner.Core.DataMinerSystem.Common.ConnectionCommunication.SendSingleResponseMessage(DMSMessage message)
at Skyline.DataMiner.Core.DataMinerSystem.Common.DmsScheduler.CreateTask(Object[] createData)
at Script.Install(IEngine engine, AppInstallContext context)"
I tried quite some conversions between time in code but for some reason results are always the same.
Here is how it looks from Cube when trying to schedule task (red one being the one that is giving issue):
CCode for creating task was being followed from this docs page.
It ended up looking like this:
Any advices on this type of issue?
___________________
Edit[6/1/'25]:
Update on this question.
Using UtcNow instead of Now datetime, with some culture info tweak solved this issue.