#10 Add a OnCron callback to the plugins

closed
5
2007-09-28
2007-02-13
No

Justification : some plugins might need to perform an operation at sparse intervals. For example: retrieve the weather data for a given town on a given server twice a day. Retrieving the information too often (at every ping) could be considered as a DoS attack.

The underlying ideas are that :
- every plugin should not have to code its own cron-like facility
- some OpenNab installs are on shared servers where unix cron is not available to the web space owners. The rabbit ping gives an opportunity to implement a cron.

There's a potential issue regarding the time needed by the OnCron to execute. This shall not slow down the ping reply to the rabbit.
An idea to test : call the OnCron at the end of p4.php *after* sending the reply to the rabbit

Discussion

  • Herman Kuiper

    Herman Kuiper - 2007-02-20
    • assigned_to: nobody --> ozuzo
     
  • Olivier Azeau

    Olivier Azeau - 2007-09-27

    Logged In: YES
    user_id=1121766
    Originator: YES

    add OnCron callback to each plugin
    crontab can be defined in .ini or dynamically by the plugin code

     
  • Olivier Azeau

    Olivier Azeau - 2007-09-27
    • assigned_to: ozuzo --> oaz
     
  • Olivier Azeau

    Olivier Azeau - 2007-09-28
    • status: open --> closed
     
  • Olivier Azeau

    Olivier Azeau - 2007-09-28

    Logged In: YES
    user_id=1121766
    Originator: YES

    implemented in opennab 0.07

     

Log in to post a comment.