phpdoc-crontab Simple and convenient installing console commands as cron jobs.

  1. Overview
  2. Usage
  3. Installation
  4. Requirements
  5. Updates
  6. Resources

Overview

Simple and convenient installing console commands as cron jobs.

  • One control point to run all commands
  • Crossplatform job installing
  • Store schedule of launches with application source
  • Grouping jobs (example: segmentation by server)

Usage

Installing action 'Example1' of command 'Test' to run every 10 minutes. Just add doc-comment for console action.

class TestCommand extends CConsoleCommand{
    /**
     * @cron 10 * * * *
     */
    public function actionExample1(){}
}

Installation

  • Step 1: Put directory PHPDocCrontab (or only PHPDocCrontab.php) into your framework extensions directory.
  • Step 2: Add PHPDocCrontab.php as new console command on framework config:
'commandMap' => array(
    'cron' => 'ext.PHPDocCrontab.PHPDocCrontab'
)
  • Step 3: Add task to system scheduler (cron on unix, task scheduler on windows) to run every minute:
    * * * * * /path/to/yii/application/protected/yiic cron
    

Requirements

Yii Framework 1.1.6 or above

Updates

  • 2012-11-09: Adding logFileName option with support date & task placeholders

Resources

13 0
18 followers
1 040 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: Console
Developed by: Yiivgeny
Created on: May 29, 2012
Last updated: 6 years ago

Downloads

show all

Related Extensions