Robert Deutz mostly harmless

... 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!

There are no translations available.

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.    

RDBS Com_Cron


Robert Deutz
Written on Friday, 09 July 2010 13:55 by Robert Deutz

Viewed 6869 times so far. Like this? Tweet it to your followers!

Rate this article

(3 votes)

Latest articles from
Robert Deutz

Latest 'tweets' from
Robert Deutz

  • @olivierk + I would guess that 8min the ball is hold by the Quarterback looking where he can pass it, but respect they make mil $ with 4min. Link Monday, 06 February 2012 10:29
  • @adriybarrarojas ;-) Viele Grüße, hoffe es geht dir gut. Link Monday, 06 February 2012 08:28
  • now I have an idea what the Super Bowl is: 4 hour commercial interrupted by 10 sec portions of "sport" #superbowl Link Monday, 06 February 2012 07:28
  • @philiplocke I have only a few, I have to play a little bit more but I will do when I have a list :-) Link Sunday, 05 February 2012 21:18
  • had a lot of fun with bootstrap joomla template, thanks @philiplocke, don't know what your plan is with it but I've some suggestions/ideas Link Sunday, 05 February 2012 20:34

Comments

  • 1) sdd

    Author: aa

    sdsa dsa dsdsda dasd

Add new Comment

 
 
 
 
 
 
 

RDBS Comment developed by Robert Deutz Business Solution

Currently I read

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

Here I use

J! & Beyond | International Joomla! Event - May 6th to May 8th, 2011
Joomla! Community Magazine | Because community matters...