M
M
mirexdoors2018-04-20 12:48:57
1C-Bitrix
mirexdoors, 2018-04-20 12:48:57

Why is the Bitrix agent not being added?

Hello! There is the following handler, which is used for 3 sites under one Bitrix admin panel.

CAgent::AddAgent(
        "Lead::sendLeadSu({$iOrderId});",        
        "main",      
        "N",                                              
        '',                                               
        date('d.m.Y H:i:s', time() + 60 * 1),       
        "Y",                                           
        date('d.m.Y H:i:s', time() + 60 * 1),   
        30
    );

$iOrderId comes in correctly. The problem is that on the first 2 sites everything works fine, on the third AddAgent returns false.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
st_st, 2021-02-15
@st_st

Bitrix checks the agent's launch date via $DB->IsDate() and if the site's regional settings, for example en, are selected, then when creating an agent and specifying the Russian date format, agents will not be created. This is one of the possible reasons. Otherwise, you can display an array of errors in CAllAgent::CheckFields().

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question