Dotclear


Version 3 (modified by Tomtom33, 14 years ago) (diff)

--

Français

dcCron

Schedule any tasks

Author/Contributors?

Development

Bugs and features requests

Repository

Recent Changes

[2656] by Tomtom33 on 09/21/10 12:33:53

dcCron:

  • Updated link with dcLog plugin
  • Updated CSS class for tasks list

[2654] by Tomtom33 on 09/21/10 11:28:34

dcCron 2.0-RC2:

  • Exception management for check() function
  • Improved filters
  • Improved UI

[2650] by Tomtom33 on 09/20/10 20:06:11

dcCron 2.0-RC1:

  • Lock file support
  • Fixed date concurrency
  • Improved tasks check
  • Improved UI

Documentation

dcCron is a generic plugin can be called by others to schedule tasks. It provides a simply API to use it

Add / Modify tasks

To add a task in dcCron, just put this in your code :

if (isset($core->blog->dcCron)) {
 $core->blog->dcCron->putTask('taskNameId','interval','callback');
}
  • taskNameId must be an alphanumeric string. That's means just contains letters and numbers.
  • nterval must be an interger. Second is the unit .
  • callback must be an array with class name or object in first argument and function in second.

Delete task

To delete tasks just put this in your code

if (isset($core->blog->dcCron)) {
 $core->blog->dcCron->delTask('taskNameId');
}
  • taskNameId must be a valide task name id.

Attachments

Sites map