dmCronPlugin is a cron like admin application

Please see documentation

Installation

  • In a console, from your project root dir, run:
git clone git://github.com/thohms/dmCronPlugin.git plugins/dmCronPlugin  
  • In config/ProjectConfiguration.class.php, add dmCronPlugin to the list of enabled plugins:
class ProjectConfiguration extends dmProjectConfiguration
{  
  public function setup()  
  {  
    parent::setup();  
 
    $this->enablePlugins(array(  
      // your enabled plugins  
      'dmCronPlugin'  
    ));  
  • In a console, from your project root dir, run:
php symfony doctrine:generate-migrations-diff  

php symfony doctrine:migrate  

php symfony dm:setup  

Introduction

dmCronPlugin is a cron like system for Diem. It is supposed to be an alternative
for users not having access to the task management system of their Host or Server or for users
who want to manage crons inside Diem.
IMPORTANT NOTICE: Currently only Symfony commands are supported by this plugin. It was supposed to
also call Diem pages, but there is a high performance issue not figured out yet. You can set a page,
but it will not be executed!

How it works

dmCronPlugin runs on each request and checks a file under sf_cache_dir/dm/cron_last_run for a
UNIX timestamp of the last run. If this timestamp is greater or equal 30 minutes (the lowest possible
cycle) it executes all relevant crons one after the other. If a cron's cycle is set to once it also
deletes this cron from database.

Configuration

Configuration is mainly done in Diem's backend under System/Configuration/Crons and should be
self-explanatory.
There are a couple of items you can configure in your project's app.yml.
The dateformat string is used for date selections in the create and edit form.
You can also easily extend available Symfony commands by following the same scheme of cliActions
in this file. Where left side is the name shown in list and selects and right side is a Symfony command
without symfony itself.

Performance

If you want to setup crons with equal cycle you better set them not all at once within a couple of
minutes. Reason behind is that last runtime is set to the current time you're creating a cron and
if you run too many cron's at once it could take a while longer until rest of your site is loaded.
You can test it several times by just deleting the cache file noticed above.

I18n

There are a couple of strings you can translate. As always for my plugins I have put an example for German
language which you can adopt and modify for your own.
Symfony commands get description translated which is the left side in app.yml for cliActions.

TODO

As stated in the introduction I couldn't get the page requests to work. I have opened a thread on
Diem's forum under: http://forum.diem-project.org/viewtopic.php?f=2&t=181
I you like to tune in and help getting this solved please don't hesitate to post there.

    Add a comment

    Create an issue
    Impossible to fetch issues for this plugin.
    Impossible to get this plugin changelog.
    See more commits

    dmCronPlugin, created on October 16, 2010 by tohms, used by 57 projects

    Fork Diem on GitHub