Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
User avatar
By blaijord
#830987
When it executes a case generated by timer events it doesn't load the class of the plugin, only the PMfunctions of plugins.

I have a case that it can be excuted for two ways, manually or automatically by timer, this case executes a trigger that calls a function from a plugin, when it's excuted manually it works everthink okey, but when it exceute by cron it doesn't work.
workflow.png
workflow.png (20.71 KiB) Viewed 984 times
Looking at the logs I found the problem, the cron execution case doesn't load the classes of the plugins, only the PMfunctions, and the manual generation case loads all the classes of the plugins.

Inside my plugin class in the setup() function I load extra classes that I will use in the PMfunctions. The easiest way to solve this is to put the external classes I load inside the setup() directly into PMfunctions. But that's not the right way.

Debugging a little the flow of execution of crons cases I think that I found the moment that it loads the plugins, in file cron_single.php it calls a function that loads the plugins but for some reason only load the pmFunctions, not the classes of the plugins.
Code: Select all
// We load plugins' pmFunctions
$oPluginRegistry = PluginRegistry::loadSingleton();
$oPluginRegistry->init();
Has anyone had the same problem or knows the way to load the classes of plugins in the timer by default or know who to call the function to load the classes of plugins? :?

So I recently bought an addmotor Ebike which of co[…]

A crypto casino clone script is a ready-made softw[…]

BC.Game is a thriving online crypto casino gaming […]

Yes, you can restrict your PDF file from copying t[…]