Forums / Cotonti / Core Labs / Ideas / CRON Engine

Kilandor
#7544 2009-02-10 14:41
While I don't see to much need for this I guess some may like it. TrackBot and Ticketbot, and other plugins i've created run on a cron like feature, they only execute every X time, all you have to do is create a config field to store the time. There is even plans for "hidden" config fields in the future to hide things like this.

The "race condition" is just referring to, multiple things possibly executing at the same time, which conflict each other and causes problems.

But maybe a better improvement to this feature would be some sort of timer feature for plugin hooks. There could be an extra field in hooks for a timer, so they only are included every so often, then when the script is loaded it can use a function like sed_hook_timer('plug', 'hook', 'newtime'); Then it won't be executed again untill that time.

This would be the best way to do it, No fancy extra complete system for it. All it requires is a new column, and a slight change to hooks. And we can add an new function for easy setting. And we could even go so far as for the admin panel to create on plugin list, to reset timers for all plugins, and for each plugin specifically in the plugin page.

Actually after my idea here, i like it alot. If there are no objections, i'll implement it into the core. As it will also cut back for some people on includes that they don't need.

Cache system definatly should not be used for this, thats not its purpose in anyway