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.
Hi Rijad,
The "One of the date/time values is invalid" error can be thrown when there was a value provided for one of four date/time values in the general info array, but the parsing was not successful.:
- "start date" (general info value at index 1) should contain a string that represents a date in format "2024-09-24".
- "end date" (general info value at index 2) should contain a string that represents a date in format "2024-09-24".
- "Start run time" (general info value at index 3) should contain a string that represents a time, either in format "23:36" or "23:36:42".
- "End run time" (general info value at index 3) should contain a string that represents a time, either in format "23:36" or "23:36:42".
Looking at your code, you only provide a value for the 'Start run time' (Index 3), so we can already isolate it to that specific value. It seems that in the screenshot, the value provided is derived from the 'startDate' variable using the 'ToString' method with format provider "03:00:00". That format provider seems incorrect, to have the correct format, you'll need "HH:mm:ss". Can you replace that and give it another try?
Hi Thomas,
I added that way of generating start time, but still issue is the same.
We need to schedule it always at 3AM, so my code looks like this now (I will edit main post).
Still throwing same issue on one agent, while on other everything is working fine again