Hi, I am trying to create a scheduled agent via to C API which runs every 5 min all day every day. By using NotesPeek I have tracked down my problem to the AgentInfo object. The current code I am using is below. Note I have tried to following the documentation but this just doesn’t work.
m_AgentInfo.wVersion = (WORD) 0; // Must be 0.
m_AgentInfo.wTriggerType = (WORD) ASSISTTRIGGER_TYPE_SCHEDULED;
m_AgentInfo.wSearchType = (WORD) ASSISTSEARCH_TYPE_ALL;
m_AgentInfo.wIntervalType = (WORD) ASSISTINTERVAL_TYPE_MINUTES;
m_AgentInfo.wInterval = (WORD) 5; /* every five minutes (smallest interval possible in UI) */
int starthr = 8;
int startmin = 15;
int endhr = 17;
int endmin = 30;
m_AgentInfo.dwTime1 = (DWORD)((starthr * 60 + startmin) * TICKS_IN_MINUTE);
m_AgentInfo.dwTime2 = (DWORD)((endhr * 60 + endmin) * TICKS_IN_MINUTE);
m_AgentInfo.StartTime.Innards[0] = (DWORD) 0x00256fffL;
m_AgentInfo.StartTime.Innards[1] = (DWORD) 0xFFFFFFFFL;
m_AgentInfo.EndTime.Innards[0] = (DWORD) MININT;
m_AgentInfo.EndTime.Innards[1] = (DWORD) MININT;
m_AgentInfo.dwFlags = (DWORD) 0;
Does anyone had any better luck? I know writing the hex out is hardcore but it’s the best I have got it to go so far.
Any ideas would be most appreciated.
Oliver