V
V
Vladislav Aleinikov2020-09-24 17:12:42
1C-Bitrix
Vladislav Aleinikov, 2020-09-24 17:12:42

Why does the agent deactivate itself?

Install agent:

\CAgent::AddAgent( "\\Some\\Class\\Name::createTasks();", $this->MODULE_ID, "N", 60*10, "", "Y");

The method Name::createTasks()communicates with an external api.
The agent works for a day, after which it turns off.
When you try to activate the agent from the admin panel, it is disabled.
When manually launched from the admin panel, a message is returned: "The command was successfully sent to the agent."
When executing the method Name::createTasks(), there are no syntax errors and the method successfully returns a response from the api.

Here is what the log returned (BX_AGENTS_LOG_FUNCTION)

array(4) {
  ["STATE"]=>
  string(5) "start"
  ["AGENT"]=>
  array(6) {
    ["ID"]=>
    string(5) "13073"
    ["NAME"]=>
    string(38) "\Some\Class\Name::createTasks();"
    ["AGENT_INTERVAL"]=>
    string(3) "600"
    ["IS_PERIOD"]=>
    string(1) "N"
    ["MODULE_ID"]=>
    string(12) "Some.module"
    ["RETRY_COUNT"]=>
    string(1) "3"
  }
  ["EVAL"]=>
  bool(false)
  ["E"]=>
  bool(false)
}

Why does the agent itself deactivate and no longer start?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question