IRC-Bot icon indicating copy to clipboard operation
IRC-Bot copied to clipboard

Scheduler

Open NanoSector opened this issue 10 years ago • 3 comments

Perhaps it would be nice if functions could be executed on a certain interval. E.g. get the latest Github commits every hour and display them. Or clean up logs every day.

The principle would be the same as the Listener structure, except it's triggered in a different way.

I don't have ideas how a scheduler in PHP would work, so if this is agreed on that's something to work out.

NanoSector avatar Jan 04 '15 21:01 NanoSector

I'll take a look when I have some time, shouldn't be too hard

TimTims avatar Jan 04 '15 22:01 TimTims

+1 I could really need something like this for my implementation of the IRC-Bot ;)

oliveratgithub avatar Jan 06 '15 07:01 oliveratgithub

Okay. You can just hook into the main loop. We could use something similar to Listeners, the new log system makes use of this.

Do the modules themselves need to do the actual interval work, or can we make the bot handle the intervals themselves?

NanoSector avatar Jan 09 '15 21:01 NanoSector