Robert Deutz meistens harmlos

... hier schreibe ich über Dinge, die mich freudig stimmen, über schönes, aber auch über das was mich nervt und aufregt, ich fordere hier Gerechtigkeit für alle bin aber nicht gerecht zu jedem, ich bin hemmungslos parteiisch und schwer von einer anderen Meinung zu überzeugen und oft bestimmt auch ratlos aber nicht sprachlos. Nur damit keiner sagen kann er hätte es nicht gewusst.

Cron Component for Joomla!

If you integrate Joomla! in a larger and complex environment it is often necessary to have processes running without starting the process manually. In a UNIX environment this is quite simple, you can use the cron functionality, but for Joomla! the problem is that you don't have your Joomla! environment, if you run a UNIX shell script. Com_cron for Joomla! fills this gap.

Com_cron is a component to run **jobs** in a Joomla! environment. The concept has tree parts:

  1. A admin component to administrate the jobs and show the logs
  2. A frontend part to allow the starting from outside (e.g. unix cron + curl)
  3. The Jobs are implemented as plugins. Every plugin can use tree events "onBeforeRunCron","onRunCron" and "onAfterRunCron".


The installation process installs an example plugin and the component. After that you must set up a hash in the parameters for the component and you have to create a job. For the first run you can setup a name and choose a plugin, if you don't change anything more then the job runs with every trigger from outside.

Then you have to trigger the component. If you have set the hash to 123456, then you have to call your site with index.php?option=com_cron&hash=123456. After that you should see a log item in the backend. You should see the last executed set on your job and you should see the output from the plugin in the frontend:

OUTPUT
This is the test output for the Event: onBeforeRunCron
This is the test output for the Event: onRunCron
This is the test output for the Event: onAfterRunCron

Please take a look at the example plugin, it explains how you can use the functionality.

That's it.
 
Please keep in mind:

  • that this component is not for production use.
  • The deinstallation process deletes all tables created from the component.
  • Cron Plugin will not be deleted, if you install the component, but it will be over-written if you reinstall.    

DIRECTORY NOT VALID:/var/www/web02/sites/robert-deutz.de/rddown


Robert Deutz
Geschrieben am Freitag, den 09. Juli 2010 um 13:55 Uhr von Robert Deutz

Bis jetzt schon 11065 mal gelesen. Ist das Interessant? Twittere es deinen freunden!

Beitrag bewerten

(3 votes)

Die letzten Beiträge von
Robert Deutz

Die neuesten Tweets von


Kommentare

  • 1) sdd

    Autor(in): aa

    sdsa dsa dsdsda dasd

Neuen Kommentar hinzufügen

 
 
 
 
 
 
 

RDBS Comment entwickelt von Robert Deutz Business Solution

Ich lese gerade

Was würde Google tun?
Wie man von den Erfolgsstrategien des Internet-Giganten profitiert

Auf dieser Seite nutze ich

Joomla! Community Magazine | Because community matters...