Cron support, how does it work?

A new file has been added to the program that handles the cron requests, this is the file csvi_class_cron.php. This file can be called directly from the command line. For example, if the file is located in /var/ww/html/administrator/components/com_csvimproved/classes/csvi_class_cron.php it is called like this:

php -f /var/ww/html/administrator/components/com_csvimproved/classes/csvi_class_cron.php <arguments>

Arguments

There are several arguments that need to be passed on to make the cron work. These arguments are:

  • username

This must be a known admin user in the Joomla system

  • passwd

The password belonging to the supplied username.

  • template_name

The name of the template that needs to be used. This must exactly match the name of the template in the template list.

  • filename

The name of the file that needs to be read including the full path of the file.

Including the arguments the full command can look like this:

php -f /var/ww/html/administrator/components/com_csvimproved/classes/csvi_class_cron.php username=“admin” passwd=“admin” template_name=“Product import” filename=”/usr/files/import/checkmein.xls”

The assumption here is made that the php command is in the global path statement, otherwise the full path for PHP should be provided too.

The output

The output has been optimized for command line output, this means there is no HTML code. This can be forwarded (piped) to a file for later analyses.

 
csvimproved/explained/cron.txt · Last modified: 2008/06/04 15:08 by rolandd
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki