Monday, May 17, 2010

Cubi cronjob manager

Every week Openbiz makes progress on feature implementation and bug fixes. I should have worked more harder to record them in the blog.

Cronjob manager is added in Cubi. What cronjob manager does?
  • Provide a backend management UI to allow administrator to add/edit/delete command in cronjob format
  • A job manager script that reads and parses the jobs in the cronjob list, then execute them.
A cronjob defined in Cubi can have following attributes.
  • name
  • minute, hour, day, month, weekday. Unix cronjob format is used. Note: */N format is not supported.
  • command. This is the command to run in this job.
  • sendmail. This field includes the emails to be sent after completing executing the job.
  • max_run. max_run tells how many concurrent execution of this job. By default max_run=1. It means only single job can run as the same time. If max_run=0, then no limit of the concurrent job execution.
  • description
To start cronjob manager, add "cubi/bin/cronjob/cron.php" in system crontab.

cronjob log files are outputted to cubi/log. Each job will have its own log.

Cubi provides a helper command called run_svc.php that can invoke service with following format.
usage: php run_svc.php service_name method parameter1 parameter2 ...

Cronjob manager can add this command to the job list.

No comments:

Post a Comment