C API - Scheduled Agent Creation

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

e: oliver.carr@AntiSpaMgmail.com

Subject: C API - Scheduled Agent Creation

afaik there’s a c-api sample that creates a scheduled agent. if so - did you try it?

since notes-peek displays all contents of agent design-doc (e.g. for $AssistInfo) what is the difference between your agent and same agent created in ui?

what’s the problem with your agent? does it crash? some error? not run at all?

Markus Seitz

markus.seitz@icodex.com

Subject: C API - Scheduled Agent Creation

Hi Oli Carr,

I am also facing same problem, trying create an Agent using domino objects dll / C++ api but I could not proceed it. I will appreciate if you succeeded in your attempt will please post the code.

Subject: C API - Scheduled Agent Creation

In case you’d rather do it in LotusScript, an LSX:

http://www.openntf.org/projects/codebin/codebin.nsf/0/6087a3c7c0e25a3888256c780055d8d5?OpenDocument

See:

Help | about

Help | using