Answer the question
In order to leave comments, you need to log in
How to specify an agent for a module?
I am writing a module and it is necessary that after installing the module, an agent is created,
it will run a function that accesses the infoblocks API at a specified frequency and imports data from an external source into the infoblock.
How can I specify in the settings of my module that when it is installed, an agent is created that will start after the required amount of time?
And where to place the agent code itself in the module structure?
Answer the question
In order to leave comments, you need to log in
An agent can be added using the CAgent::AddAgent
method.
A call to this method can be placed in the install/index.php of the module.
And where to place the agent code itself in the module structure
Add the InstallAgent function to install/index.php with the required parameters CAgent::AddAgent
https://admin4web.ru/blog/moduli/avtomaticheski-so...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question